Support the ongoing development of Laravel.io →

4,314 Threads

Is it possible to query 'where' on eager loaded relationship without a join?

Is it possibly to make a WHERE query on a eager loaded relationship? Say my users table has a name,...

0 Likes
2 Replies
Solved

Mysql CRUD generator in Laravel 4

Hello to everyone, there is any way to create the CRUD from a database such as other frameworks like...

0 Likes
3 Replies
Solved
posted 10 years ago

Explicit declared attributes

Laravel declares the set of attributes for a class runtime by taking the according table fields. Is...

0 Likes
2 Replies

Eloquent: Filter by joining two "belongsToMany" relations

I have the following tables in my database: recipes id name users id name badges id name badge...

0 Likes
5 Replies

Creating a sub-domain route from a primary key

Hello, I currently have a page that lists all of the 'products' in my database by name. I am trying...

0 Likes
4 Replies

Different create() and store() method for same model but with different attributes

Hello, I am in i situation where I have to handle that the way to create and store method are not th...

0 Likes
1 Replies

Must return Relation

Hello, In my application i've 3 Model, Professeur, Etudiant and Administrator A Professeur manage ma...

0 Likes
3 Replies

db:seed on SQL server

Has anyone tried running db:seed on SQL server? My file consists of multiple rows with IDs specified...

0 Likes
1 Replies

Eloquent mass-assignment with file upload

Hi, I'm using mass-assignment to insert a load of records into the database, how do I handle a file...

0 Likes
2 Replies

Is this a pivot table or not?

I cannot figure out my Eloquent Relationships and it is driving me NUTS! I've basically decided I've...

0 Likes
2 Replies

MySQL DAYOFWEEK in DB::raw

I'm trying to get all services where the serviceDate is on a Monday, and am getting something wrong....

0 Likes
1 Replies
Solved

Scope And Relationship on Same Model

I have a table called payments which contains a field called Vendor ZIP. I have a table called 20150...

0 Likes
1 Replies
posted 10 years ago

Some model's Accessors are not being picking up

I have a model with a number of fields. I need to massage some before output, so I use accessors - b...

0 Likes
1 Replies

Inheritance between models.

Hi. I am new to laravel framework. I need to know that how can we do inheritance between two models...

0 Likes
1 Replies

Bidirectional eager loading on L5 with 3 models

I already typed my issue here if you prefer, with the important bit of each classes I have 3 models...

0 Likes
1 Replies

Authenticate on multiple tables/models with Laravel 5

Hello guys, I have two questions about Authentication: How to use Auth with multiple tables? (Stude...

0 Likes
2 Replies

Php artisan migrate error?

Hi guys, when I type the command in bash below, php artisan migrate I got the error below exception...

0 Likes
2 Replies

Weird SQL error while trying to remove related object

I have Category model which has one to one relationship to itself. It obviously has id and parent_id...

0 Likes
4 Replies
Solved

are tables updatable by modyfing schema migration file?

Let's say I want to add a column to a table, I tried to modify the schema file inserting the new col...

0 Likes
1 Replies

How to use 'belongsToMany' passing parent ID (pivot) to WHERE?

I have 3 models, ie: Country, User, Bike. Country has many User, User has many Bike, and bike can be...

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.

© 2025 Laravel.io - All rights reserved.