Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
250 views

I'm using Laravel 7. would like like to inject services into a event listener. Injecting their interfaces through the constructor works fine, but when I add "implements ShouldQueue" to the ...
0 votes
0 answers
69 views

My question is: How can I use laravel service containers to do heavy tasks. Actually I would like to use service containers to increase the performance. Suppose we have the below class: class ...
1 vote
0 answers
316 views

Context: From a Laravel service container, we can easily bind abstracts to concrete implementations, and variables to scalar types, using the following, respectively: // Abstracts to concrete ...
1 vote
0 answers
164 views

I just made changes to the application structure for my Laravel application. It works well when runnning tests (for the Http controllers). The problem is when i try to run artisan commands (that ...
0 votes
0 answers
134 views

Would like to build in a simple validation for the value of the APP_ENV parameter in my Laravel application. I want the parameter to be either dev, tst, acc or prd. If it's not one of these, my ...
0 votes
0 answers
425 views

Followed every step from laravel 9 manual, and my service will not register consistently. Don't quite know why but it suddenly breaks and I receive a Target class [thumbnail] does not existerror out ...
0 votes
0 answers
556 views

Due to debugging reasons (I am hunting down a very weird bug), I need to extend the Laravel classes Illuminate\Database\DatabaseManager, Illuminate\Database\Connection, and Illuminate\Database\Query\...
3 votes
0 answers
263 views

I got a question. Is it best practice to define gates in custom service providers? I am writing a permission system in Laravel by defining gates for each permission. I created a custom service ...
1 vote
0 answers
358 views

I want to switch the payment gateway based on the user's request. I don't want multiple endpoints for each gateway, so i'm trying write one endpoint that handles multiple payment gateways. With that, ...
1 vote
0 answers
56 views

In the laravel Request facade we have the key 'request' being returned. To my understanding this is the key that is bound to the service container to resolve a class. In which file do we have the ...