Support the ongoing development of Laravel.io →

4,311 Threads

Relationship between Pivot table hasMany turns

Hi, I am trying to create a game with the tables listed below. There is a sample of the migration fi...

0 Likes
0 Replies

Customize / localize message of an ModelNotFoundException

After updating to Laravel 8, I figured out that the behavior of what happens if I use model binding...

0 Likes
1 Replies

Consultation in Laravel

I'm trying to get the name and id of a certain department using the query: $department = Department:...

0 Likes
2 Replies
Solved

Schema::hasColumn has problems in some scenarios

After model is set from(), in addGlobalScope, query field does not exist column through Schema::hasC...

0 Likes
0 Replies
posted 2 years ago

Laravel Eloquent: When search criteria are missing

It's about Laravel Eloquent. I have a search filter programmed with four search criteria. Now it can...

0 Likes
2 Replies
posted 3 years ago

Buenas tarde me podrían ayudar con una relación de 3 tablas

No se que mas me falta para que funcione a la hora de guardar desde el controlador. La idea esque un...

0 Likes
1 Replies

Custom Route Binding when using withTrashed on routes.

I am having a problem with implicit model binding on routes for Soft Deleted Models. When using the...

0 Likes
1 Replies
Solved

Can not tags by using Laravel Spatie Tag library

In model:- use HasTags and when i have attach tags using like this $model->attachTags(['Tag 1',...

0 Likes
0 Replies
posted 2 years ago

Laravel 8 get data of last 7 days

I'm using laravel 8 and I want to list data of the last 7 days for each row and when no data is foun...

0 Likes
3 Replies

how to retrieve data with eloquent relation in laravel 8 api

i tried to create an api with laravel 8,when i try to retrieve data with eloquent relation it's gett...

0 Likes
1 Replies
posted 3 years ago

Eloquent groupBy Day

Hi I'm using below code to retrieve "day" and "amount". However if there is any...

0 Likes
1 Replies

Laravel 8.X Blade using anchor tags in a @foreach

Hi! I'm a little confused with the blade @foreach loop: I have a table that shows a list of car make...

0 Likes
1 Replies

how to implement dynamic filters associated with models

I've a lots of models like User, Order, .... I want to write dynamic filter associated with request...

0 Likes
1 Replies

How to slow down SQL execution rate in background job.

Hi, We have a Laravel job which uses Eloquent to generate formated data for caching. The job hits th...

0 Likes
0 Replies

FIQL/RQL parser for Eloquent models

Hello, I need to run queries to my eloquent models using some parser using FIQL or RQL syntax. Can s...

0 Likes
1 Replies
posted 3 years ago

Eloquent: get all non-trashed plus one specific trashed

How would I get a list of active Users plus a User that might be soft-deleted? Say, a salesperson is...

0 Likes
2 Replies

Laravel 8 relationship three models belongs to Parent model

Hello everyone I'm currently working on a laravel project where I have a parent table that has the i...

0 Likes
1 Replies

Update Database Field On Checked & Unchecked Of Checkbox

Hello, I Want To Update My Database Column Of Checkbox On Checked & Unchecked, Want Will Be The...

0 Likes
3 Replies

How can i show auto calculated field in a view?

Hi i have in my database a table with the following fields: $table->decimal('sale_price')...

0 Likes
4 Replies

How can I optimize this eloquent code for better performance

Product belongs to many postings, and I want to sum multiple columns. This example working correctly...

0 Likes
1 Replies

Thanks to our community

Solutions given in the past year. Excluding solutions from thread authors.

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.