1,387 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
1
answer
70
views
How do I use two databases with docker compose?
I have set up an php laravel sql platform with docker compose with the following docker compose.yml. I only have one database(with production data) but I also want to test out somethings with dummy ...
0
votes
1
answer
60
views
Insert and update database using save() in laravel causing duplicates
I have a function that saves two related models inside a transaction. But after running it, I see duplicate entries in the database — same data but different IDs.
Here’s a simplified version of the ...
0
votes
1
answer
2k
views
Laravel Error: Uncaught ReflectionException: Class App\Policies\ModelPolicy does not exist in Command line code
I don't know what I have done with my Laravel 5.3 Project but I have this error in Laravel log:
local.ERROR: Uncaught ReflectionException: Class
App\Policies\ModelPolicy does not exist in Command ...
0
votes
0
answers
266
views
Convert Laravel query eloquent to query builder when eloquent using with('relation')
I am using Laravel 5.7 and have a query written using Eloquent. I am attempting to convert it into an equivalent Query Builder query to enhance performance. However, I am facing difficulties when ...
0
votes
1
answer
4k
views
Laravel Send email using AWS SES
I have the following config from aws in my laravel 5.7 app (admin.my-app.com) that i'm maintaining.
my .env
MAIL_MAILER=ses
SES_KEY=aws_key_here
SES_KEY_SECRET=aws_secret_key_here
SES_REGION=us-east-1
...
1
vote
3
answers
79
views
Select multiple column in groupBy laravel 5.7
I am using Laravel 5.7 and i need to generate top selling products of current month for my reports. So i join two table products and sells. I want three columns in return which are sell_quantity, ...
-1
votes
2
answers
1k
views
Route not found in Laravel even it exists
I am trying to run an api on postman, I am getting the following error:
Method not found
I created the controller and its route using laravel 5.7, I also checked whether the route exists using php ...
0
votes
1
answer
290
views
How do you detect which database is being used during a phpunit test?
We have been having issues with local databases getting deleted while performing phpunit tests due to mistakes made in config files. I want write a function that will check to see which database is ...
1
vote
1
answer
874
views
Calling Commands From Other Commands, and answer prompts with yes
I want to create a console command that help me through a site deployment by calling other Artisan commands (a migration, followed by a series of functions that will fill the table with data.)
...
0
votes
1
answer
561
views
Getting a "o is not a function" error only when doing a production build in vue 2.7.14
I'm working on a Laravel 5.7 project that has been through a few different developers. Recently one of the devs did an npm update that caused a few issues. I've got most all of those issues cleaned ...
0
votes
1
answer
1k
views
Laravel model accessor with attribute name containing a number is ignored
In Laravel 5.7 in my database I have a property containing a number in its name - item_1_quality. When I create an accessor with method name using camel case it is ignored.
I have tried various ...
1
vote
2
answers
2k
views
How to run laravel job queue in php-fpm image on docker
I have a container with a nginx, mailhog, redis and PHP image. All these images are on the same network.
I run Laravel on the PHP image.
I want to make use of the Job queue that laravel has, but I am ...
1
vote
1
answer
573
views
Model create() method is executed twice SOMETIMES and creates duplicated entry for 1:1 relation
I am making a Laravel 5.7 system which has tons of code and models, but the ones in problem are:
Order - first created
Transport (1:1 Order) - afterwards created for Order
So Order.php has a ...
1
vote
1
answer
295
views
Laravel 5.7 testing with RefreshDatabase trait throws ErrorException: Trying to access array offset on value of type int
so as I stated in the title, I am working on Laravel 5.7 project and am making first tests in this application (big system). We did not make any tests in here yet, so this problem is the first time ...
0
votes
1
answer
343
views
No query results for user model when sending emails with Queue Notifications
In Laravel 5.8, there are no query results for Model App\Models\user when sending an email with queued notifications. When the notification is directly sent, there is no problem. But when I used jobs, ...