7,215 questions
1 vote
2 answers
224 views
How can I use a dynamic custom 404 template in Laravel?
I am making a Laravel 8 application that supports themes. The active theme is set in the settings table and the parent controller reads it from there: class FrontendController extends Controller { ...
0 votes
1 answer
79 views
Defining a BelongsToMany relation with an additional where clause
I have a belongs to many relation between two tables via a pivot table. But the business dictates that the relation needs an additional WHERE clause connecting the first with the last table. table_a ...
0 votes
0 answers
59 views
Laravel session lifetime on recursive ajax
I'm using laravel 8 with SESSION_DRIVER=file I have code that run like below, and I have a problem why the recursive not extending the expired time of session? Each process take 30sec, but after ...
-1 votes
1 answer
115 views
laravel 9 upgrade composer conflicts
I try to Upgrading To 9 From 8, but after I applied some changes in composer.json I got error : result laravel: composer update Problem 1 - Root composer.json requires facade/ignition ^2.3.6 -> ...
0 votes
0 answers
84 views
Illuminate\Contracts\Container\BindingResolutionException: Target class [admin] does not exist when accessing /admin/users in Laravel with Filament
I’m working on a Laravel 12.17 + Filament v3 project. I installed Filament using: ./vendor/bin/sail artisan filament:install --panels Then i generated a resource with: ./vendor/bin/sail artisan make:...
0 votes
1 answer
74 views
Different responses when filtering models and collections
I'm sure there is an obvious explanation here, but I'm getting weirdly different responses when filtering collections. $c=Media::all()->collect(); // first set of commands $...
0 votes
1 answer
60 views
socialiteproviders/laravelpassport : getAccessTokenResponse returns null as response
We are using socialiteproviders/laravelpassport for OAUTH2.0 integration and try to authenticate users. The first call return expected code and state values Socialite::driver('laravelpassport')->...
1 vote
2 answers
151 views
Laravel request validation: input called "data"
Using Laravel 8, I have a FormRequest Validation as followed <?php namespace App\Http\Requests\EXTERNAL; use InfyOm\Generator\Request\APIRequest; class ActionUpdateRequest extends APIRequest { ...
1 vote
1 answer
151 views
Laravel loop memory leak
I have a memory leak problem (I think that's what it is called) which I couldn't solve after numerous tries in 24 hours. Background: I have an articles table (~37M rows) with article_id and journal_id ...
1 vote
1 answer
87 views
In Laravel, how can I keep the selected options of a multiselect on an invalid form?
I am working on a blogging application in Laravel 8. There is the option to add tags to articles. There is a many-to-many relationship between articles and tags. I have an article_tag pivot table. In ...
0 votes
1 answer
48 views
Api call in another third party api call using guzzlehttp in laravel 8
I try to call api in laravel 8 in it another bank api call when token is expire so some getting error below menstion GuzzleHttp\Exception\ClientException: Client error: POST https://bankul/acctenq/v2/...
0 votes
2 answers
90 views
Failure to update article tags in Laravel 8 blog application?
I am working on a blogging application in Laravel 8. There is the option to add tags to articles. There is a many-to-many relationship between articles and tags. I have an article_tag pivot table. In ...
0 votes
0 answers
117 views
403 Forbidden Error for Laravel Storage Images on Live Server (Works Locally)
I am working on a Laravel-based e-commerce website and storing product images in storage/products/. The images load fine on my local development server, but on the live server, I get a 403 Forbidden ...
0 votes
0 answers
36 views
Laravel 8 Resource::make causing N+1 Queries problem
Background I have two models Sale and Shipment with following relation in Sale. /** * @return BelongsTo */ public function shipment() : BelongsTo { return $this->belongsTo( ...
0 votes
2 answers
105 views
How can I use a many-to-many relationship to display articles by tag in Laravel?
I am working on a blogging application in Laravel 8. I am trying to display articles by tag at the following route: Route::get('/tag/{tag_id}', [ArticlesController::class, 'tag'])->name('tag'); In ...