Support the ongoing development of Laravel.io →

3,325 Threads

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
posted 3 years ago

Entity Relationship Diagrams with Laravel

Hello, I've been using a tool for the last decade which allows me to create an ERD for my projects:...

0 Likes
0 Replies

Laravel - Larawire Multiple Dynamic Dropdown

I am creating 2 dropdown with department and specialty. Specialty is linked with Department. When sa...

0 Likes
0 Replies

[Eloquent] attach() to a pivot table when clicking on a butt

As part of a Laravel project, I plan to create a site that allows users to add video games to their...

0 Likes
2 Replies

Laravel 6 pivot casting

try to use following in Laravel 6 but the 'relations_type' column in 'contactable' table does not re...

0 Likes
0 Replies

I need help to fetch the sum of adult_rates from a colum

DB::table("rates") ->selectRaw("sum (datediff( day, case when $start_date > sta...

0 Likes
0 Replies

use eloquent model in lumen scheduler

I using eloquent model in lumen scheduler but show error Call to a member function connection() on n...

harshalone liked this thread

1 Likes
0 Replies

Fake model relationship

I have a project model where I want to associate roles and then users. The roles is a subset of the...

0 Likes
0 Replies

Custom cast ignored after updating model

After I update my model, the cast is ignored and an old value that comes from classCastCache is show...

0 Likes
0 Replies

laravel-automatic-migrations: Automatic migrations

https://github.com/bastinald/laravel-automatic-migrations Laravel Automatic Migrations Automatic mig...

0 Likes
0 Replies

Is there a sexyer way to write this code? (Laravel/Scout)

Hi everyone, name is Lucas, first post here and I'm learning Laravel and loving it. I'm working in a...

isaacongoma liked this thread

1 Likes
1 Replies

eloquent eager loading to limit for each post

I saw this thread from 7 years ago and thought I should update the answer. To improve on viquanghoa...

0 Likes
0 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.

© 2025 Laravel.io - All rights reserved.