Questions tagged [laravel-4]

Laravel 4.2 is the previous version of the open-source PHP web development MVC framework created by Taylor Otwell. Laravel helps you create applications using simple, expressive syntax.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

Dockerizing Laravel 4.1 Project with PHP 5.6 and MySQL 5.7.20

Description: I have an existing Laravel 4.1 project that requires PHP 5.6 and MySQL 5.7.20. My development environment is on Ubuntu 20.04 with PHP 8.1 and MySQL 8.0.35. I am looking to Dockerize this ...
KKR77's user avatar
  • 1
0 votes
0 answers
61 views

Pusher error: auth_key should be a valid app key

guys I did try work with edit and when I click on submit I have this error, but the changes was done and I am guessing why I have this issue Pusher error: auth_key should be a valid app key . This is ...
Anton Shupeniuk's user avatar
0 votes
0 answers
21 views

laravel-permission Is there a binding relationship between permissions and routes when the user middleware determines permissions?

For example, in the following figure: permission:member_info|member_add is added to the member routing group. If a user has one of these two permissions, the entire member routing can be accessed. Do ...
wenlong's user avatar
-2 votes
1 answer
209 views

Syntax error or access violation: 1305 FUNCTION

SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION mysky.holidaycount does not exist (SQL: SELECT *,holidaycount(date_from,date_to) as totaldays FROM leaves where employee_id = 'SLT0001')...
saravanakumar's user avatar
0 votes
0 answers
45 views

Inconsistent Solr Search Behavior for Customers with Job and Customers Without Job - Partial vs. Whole Word Search Issue

We are facing a puzzling issue with Solr search integration in Laravel, and we could really use some expert guidance to resolve this matter. Our project involves indexing data on Solr using Laravel. ...
Vinod Kumar Nardiya's user avatar
0 votes
0 answers
44 views

dependent drop in laravel with ajax doesn't work

Blade: <label class="form-label" for="basic-default-password12">اختر فصل دراسي</label> <div class="input-group"> <span class="input-group-...
Ahmed Nasser's user avatar
0 votes
0 answers
813 views

ErrorException Undefined array key 0 in php artisan serve

every time I hit php artisan serve, after working for a few seconds, this error is constantly displayed ErrorException Undefined array key 0 at D:\Request\vendor\laravel\framework\src\...
Mohammad Mashkouri's user avatar
-1 votes
1 answer
11k views

How to solve failed to download laravel/laravel from dist [duplicate]

Creating a "laravel/laravel" project at "./store" Info from https://repo.packagist.org: #StandWithUkraine Installing laravel/laravel (v9.5.1) Failed to download laravel/laravel ...
Rola Zeyad's user avatar
0 votes
0 answers
81 views

Problem accessing a route that has no parameter in Laravel 8

I have a problem accessing my route, I have a "pedidos" view where it contains some information, features and links. In one of these links I have a href with the route "pedidos.imports&...
Ozias Junior's user avatar
-2 votes
2 answers
273 views

When I upload Laravel website form local to live server this error that I face

When I upload Laravel website form local to live server that I face this error SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `sessions` where `id` = ...
MIRZA AHMER Ahmiiii's user avatar
0 votes
3 answers
103 views

What is the difference between using where() clause With() and wherehas() in relationship model

I have two relationship table. I used with using where to filter records as well as i used wherehas using where to filter records. But can't find the differences between both
Raj's user avatar
  • 1
0 votes
1 answer
135 views

Laravel 4: how get failing INSERT query SQL with insert

I need to work on a legacy product with Laravel 4 (and I cannot update it). I need to read the real query executed but I cannot get it. This is my model: class MigrationData { protected $log =...
sineverba's user avatar
  • 5,124
1 vote
0 answers
195 views

Is it safe/right to use an older version of Google api PHP client library (2.8.3) for Google Wallet api integration

I have an old/big project that is based on Laravel 4.2. In the wallet samples provided by Google, https://github.com/google-pay/wallet-samples/tree/main/php I can see that the version used in the ...
perpetual_dream's user avatar
0 votes
3 answers
82 views

how to include an arrayed @if in laravel

I'm still a newbie in Laravel, I'm using Laravel 4.2 Is there a way where if the author_ID is matched with Auth::ID it will show the specific line of codes Code blade example: @if ($data['authorID'] ==...
korugane's user avatar
0 votes
3 answers
2k views

Update record using laravel

I have a question, I have a form (view) and after submit it saves to the db. one of the records is id. when I open the form again for that ID and will press submit again what will happened it will ...
Bastian's user avatar
  • 1,129
0 votes
0 answers
35 views

Different datatype from endpoint

created a basic Api Rest service in Laravel 4.2 (the project was created in this version), and local responses me corresponding datatype (Int), but when execute endpoint from online server, receive ...
cristian Meneses's user avatar
0 votes
1 answer
124 views

How do I select a specific set of data within a data in laravel with the use of dynamo db

I am fairly new to laravel so I would like to know how do you grab a the data from 'data' with laravel query the dynamo database is like this { "subdomain": "subdomain", "...
korugane's user avatar
0 votes
1 answer
411 views

Laravel, call Delete with JavaScript

I'm still a beginner with Laravel. I wanted to do the usual "are you sure you want to delete this" question as a modal. I'm trying to do it with JS, and I have the following function that I ...
Alexis1710's user avatar
0 votes
1 answer
871 views

Call to a member function comments() on null when use foreign key

This is error Call to a member function comments() on null, in model give a relation still show this error Article model function user() { return $this->belongsTo(User::class, 'id'); } public ...
user10522002's user avatar
-1 votes
2 answers
128 views

Call to undefined function curl_init() on console Command laravel

I want to call curl_init() on console Command laravel but I'm getting error "Call to undefined function curl_init()" ? but when I call curl_init() from Controller laravel is working fine. ...
Komang's user avatar
  • 1
0 votes
1 answer
404 views

Laravel url() function returns public two times

I am using Laravel url() function to get website base url, but it returns public two times I don't know where I am doing wrong? Any help would be highly appreciated. Here is my code. <link rel='...
user2736878's user avatar
0 votes
3 answers
2k views

Pass date in url in Laravel

I have this Link in my view <a href="{{route('detail', ['id'=>$row->id, 'date'=>Carbon\Carbon::now()->format('m-d-Y') ])}}"> Link </a> when i click on this link ...
user3653474's user avatar
  • 3,493
-1 votes
2 answers
2k views

ERROR!!! Illuminate\Database\QueryException SQLSTATE[42S02]: Base table or view not found: 1146 Table

I ran into an error and I have not figured out how to resolve it alone. so I opted to get help from this community. I will explain a bit though the screenshots are provided. I created a new laravel ...
kaylancer's user avatar
0 votes
1 answer
54 views

determine url parameter in Laravel

I am new to Laravel an have a question. I have controller named ReportsArchiveController and function named loadReport in it. this is what the method get public static function loadReport(Request $...
Bastian's user avatar
  • 1,129
0 votes
1 answer
252 views

Property does not exist on this collection instance when fetching from related models

I have this query which return data from one table : $existData =Booking::where(function ($query)use($start, $end){ $query->whereBetween('start', [ ...
user3653474's user avatar
  • 3,493
0 votes
0 answers
189 views

Memory size error when updating data base despite chunking in Laravel

I am working in a Laravel project in version 4.2 (quite old, I know), trying to update a database table of around 100.000 entries. I am doing so by looping through a list of of 7500 users: User::chunk(...
LololoTheGreat's user avatar
-1 votes
1 answer
42 views

How to search from relationship data ? In laravel

public function scopeSearch($query, $value) { $searchValues = explode(' ', $value); if (!$value) return $query; return $query->where(function ($q) use ($searchValues) { foreach (...
Nis shres's user avatar
1 vote
1 answer
2k views

Pass a laravel variable into a jquery array

I am trying to pass a variable into a jquery autocomplete script check this url (https://jsfiddle.net/duoc5bbh/1/) I found. Autocomplete Form <input id="name" > <input id="...
dotun seyi's user avatar
0 votes
0 answers
243 views

css is wrongly displayed when using php artisan serve --host=0.0.0.0

I am trying to access to a laravel 4.2 project from an external machine, to do that I need to use php artisan serve --host=0.0.0.0. this is working well and all css files are running when I open a ...
Tarek Bakri's user avatar
-2 votes
1 answer
38 views

Can anybody tell the if file doesn't exists it redirect to webinstaller

Can anybody tell the if file doesn't exists it redirect to webinstall. How to go the redirection to webinstaller url in laravel when i deleting the .env file is 500 error
rajender's user avatar
-3 votes
1 answer
35 views

Not getting condiotions if statement and else statement

$tickets = Ticket::select("tickets.cust_id","tickets.ticket_id","tickets.category_id","tickets.subject","tickets.priority","tickets.message"...
rajender's user avatar
0 votes
2 answers
507 views

How to retrieve multiple image from database which is seperated by , in laravel 8

I am new to laravel and I am working on a project where I saved multiple image in a single column where image is separated with a column but I am unable to fetch images my data insert code is below ...
user avatar
0 votes
0 answers
413 views

Illuminate\Contracts\Container\BindingResolutionException, Target class [admincontrol] does not exist

My route - Route::put('/fileupload','admincontrol@fileupload')->name('fileupload'); My admincontroller code is - namespace App\Http\Controllers; session_start(); use Auth; use App\Imports\...
vimal's user avatar
  • 41
-1 votes
4 answers
798 views

Form didn't insert data to database properly [Laravel][Eloquent]

I have problem with my code somewhere that make my data $request just didn't passed to my database table (?), I'm not sure what the problem is but every time I try to submit it just redirect back to ...
SomeRandomCode's user avatar
0 votes
2 answers
120 views

how can I read something from Laravel command into my controller

Thanks to be advised that I have created a new laravel command that runs periodically through the schedule function. Here in the handle function, I am performing this query every day and I want to be ...
Ahmed Adel's user avatar
0 votes
1 answer
728 views

Make Accept Terms and conditions fields required in Laravel

I have a checkbox in vue.js <input v-model="form.accept" name="Accept" type="checkbox" value="false"> i have model defined data() { return { ...
user3653474's user avatar
  • 3,493
0 votes
0 answers
1k views

laravel can't start first project

After downloading the latest php and installing composer. then installed laravel using the command composer global require laravel/installer Changed current directory to C:/Users/User/AppData/...
diabloren's user avatar
1 vote
1 answer
1k views

Generating openAPI(swagger) spec files automatically in PHP

I am trying to figure out how can i generate the openAPI json or yaml file automatically in my php application. As of now, i saw little to none docs on it, so i pretty much in the dark on this issue. ...
GabMic's user avatar
  • 1,432
0 votes
1 answer
452 views

Class Controller not found in laravel 4

I'm beginner in Laravel and when I'm trying to use Controller I'm getting this error Illuminate\Contracts\Container\BindingResolutionException Target class [PostsController] does not exist. http://...
Ameen NA's user avatar
0 votes
2 answers
879 views

Laravel append attributes with related relation will cause reach maximum function nesting level

class Order extends Model { protected $appends = ['test']; public function orderItems() { return $this->hasMany('App\OrderItem'); } public function getTestAttribute() ...
wagaru's user avatar
  • 13
0 votes
1 answer
367 views

PDF not generated in laravel

I'm generating pdf using following code in Laravel but the issue is sometimes data is saved in the database and pdf is not generated when i check the pdf folder there is no pdf files with that name, ...
user3653474's user avatar
  • 3,493
0 votes
1 answer
650 views

Filter record through dates not working laravel

I have a expiry_date (type=date) column in my table $currentDate = date('Y-m-d'); $Data = Post::whereDate('expiry_date','<=',$currentDate)->where(['status' => 'active'])->orWhere(['p_id' =&...
user3653474's user avatar
  • 3,493
0 votes
1 answer
245 views

Unique email with each type of user in Laravel

I want to register many user with the same email but different type For example [email protected] type 1 [email protected] type 2 the email will unique with type is the condition. How can I write the rule if the ...
Duy Nguyen Tho's user avatar
0 votes
1 answer
860 views

Password Hash::check not working (SQL+Laravel)

I use laravel framework for my website login system. I then created an android application for the website and created a separate login.php in order to let people login from the android app. This file ...
Java Dava's user avatar
-1 votes
1 answer
259 views

Cannot sava data in database in notification file in Laravel

I'm using Laravel Notification and i want to save data in my database table if i write my insert query then i'm getting following error otherwise Notification are running : TypeError: Return value of ...
user3653474's user avatar
  • 3,493
-1 votes
1 answer
397 views

When user click on like butten then show only like button

// LIke the page code public function like($id){ $user_id = Auth::user()->id; $like_user = article_likes::where( ['user_id'=>$user_id, '...
rajender's user avatar
0 votes
2 answers
285 views

Where is the notification push code on Laravel

Sorry for asking this question. I'm new to laravel and I'm trying to find out the location of the responsible script of sending the notification on submite button event. When I go to http://127.0.0.1:...
user avatar
-1 votes
3 answers
118 views

Convert JSON IN LARAVEL

Here is my JSON [ { "TIMESTAMP": "2021-06-09 13:13:26", "COL1": "10", "COL2": "20", "COL3": &...
Navin's user avatar
  • 1
0 votes
1 answer
1k views

Call to private Instamojo\Instamojo::__construct() from context

public function pay(Request $request){ $api = new \Instamojo\Instamojo( config('services.instamojo.api_key'), config('services.instamojo.auth_token'), config('services.instamojo....
CodeHut's user avatar
  • 19
1 vote
1 answer
188 views

Update pdf which is open in laravel

I'm creating pdf file using DOM pdf, it is working but when i try to recreate it with same name and the pdf file is open then i'm getting this error message: message: exception: "ErrorException&...
user3653474's user avatar
  • 3,493

1
2 3 4 5
289