Support the ongoing development of Laravel.io →

4,314 Threads

Laravel - filter by multiple relation values while keeping eloquent pagination

I have two models, Character and Tag, that are in many-to-many relationship. I'd like to be able to...

0 Likes
5 Replies
Solved
posted 11 years ago

Sorting by count of relationships

I have a system with users have countries. I have a view where I want to show a list of countries an...

0 Likes
3 Replies

RESTful controller's create-method and belongsTo relationship

What I'm looking for here, is an elegant way of creating a new Contact. As the image says, a Contac...

0 Likes
1 Replies
Solved

Putting Eloquent model into folders

Using Laravel 5, how do you put models into folders? Currently mine are sitting underneath the defau...

0 Likes
3 Replies
Solved

Update without touching timestamps?

I've created a type of forum which is sorted by "updated_at", but right now every page vie...

0 Likes
7 Replies

Undefined offest:0

I keep getting this error here $regionID = $destinationQuery[0]->RegionID; It is when u'm trying...

0 Likes
0 Replies

Eloquent does not alias tables in a self join relationship

I have an parent->child relationship where a confirmed column in the pivot table exists. Both the...

0 Likes
3 Replies

Authentication many to many laravel and slug

I am new in laravel 4 In my app every user my have many blog which store in in table in database Blo...

0 Likes
0 Replies

Grouping eloquent results via a distant relation

I'm building a football site, and have a problem with listing all the games the way i want. Basicall...

0 Likes
1 Replies

[ELOQUENT] belongsTo() not returning relationships

Hello everyone! I have the following models. Product.php class Product extends Eloquent { protected...

0 Likes
4 Replies
Solved

Need small help In Updating record.

Hello Experts, I need small help regarding to updating profile information. im trying to update prof...

0 Likes
1 Replies
Solved

LARAVEL4 - chunk function not working with model save().

I am doing this for hashing all the passwords from previous project which was in pure PHP and rewrit...

0 Likes
0 Replies

Polymorphic association SQLSTATE[42S22]: Column not found

Hello, I'am getting error when I'm using polymorphic relation. class User extends \Eloquent { pu...

0 Likes
0 Replies

Saving in a pivot table

When I try to save data into a pivot table I get this error. SQLSTATE[23000]: Integrity constraint v...

0 Likes
20 Replies

how to send value for options in dropdown list from array

Hello, how to send value for options in dropdown list from array, or how to convert output this code...

0 Likes
4 Replies
Solved

Method naming convention for eloquent relationships.

I am confused with naming conventions for methods in model relationships.. If I use Camel case, the...

0 Likes
1 Replies
posted 10 years ago

Laravel 5 Eloquent leftJoin on belongsTo relation

I have two database tables: users and students. A student is a user, but has extra data (address). I...

0 Likes
1 Replies
posted 10 years ago

How to eager load constraint on data from main model in the constraint?

Is there a way to reference the base model i'm query against? $person doesn't exist yet because i'm...

0 Likes
1 Replies

Search in laravel 4 issues.

i am writing my app and i have this issues with the search field from the search controller. the sea...

0 Likes
1 Replies

Problem with relations in Eloquent in Laravel 5.0

I am new to Laravel but started from Laravel 5.0. I got 2 tables: Doctors class CreateDoctor...

0 Likes
3 Replies
Solved

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.