Support the ongoing development of Laravel.io →

4,314 Threads

Eloquent "One to Many" to "One to One" Just cant get it to work (with Images)

Hi All what i am trying to do is..... 1 users has many Import REF's and each REF has one document my...

0 Likes
5 Replies

ORM toJson() not returning JSON, but returning SQL statement?!

I am having the following in one of my controller's show($id) method. There is only this line in the...

0 Likes
0 Replies

How to use postgresql ARRAY, JSON fields in Schema Builder

How to use postgresql ARRAY, JSON fields in Schema Builder

0 Likes
2 Replies

Preventing overwriting changes in database.

I have a system for publishing photos. Photos are published in articles. Article is searched based o...

0 Likes
5 Replies

Mysql to Postgres Conversion

Hi , We are using laravel 4.2. Till now we have used mysql database . Now we want to mive to Postgre...

0 Likes
2 Replies

Multi-table class inheritance possible with Eloquent?

I have an application that's getting pretty large. I've noticed that one of our tables "locatio...

0 Likes
1 Replies

Call to undefined method Illuminate\Database\Query\Builder

Sorry, about formating at first. It's my first post here, I'll try to edit it. I spend some hours of...

0 Likes
0 Replies
posted 10 years ago

Laravel Model Relationship Help!

What could be wrong with my model: Connection table: id, parent_sid, connection_id (nullable) Connec...

0 Likes
2 Replies
posted 11 years ago

One-to-one THROUGH relationship with eager loading?

Hello, I've been breaking my head over this one, and I hope I'm missing something simple. I have a C...

0 Likes
2 Replies
posted 10 years ago

Multiple parameters in routes (city, category)

I'm trying to build a simple city/category listings site, but I don't know exactly how to do it: Thi...

0 Likes
1 Replies
posted 10 years ago

Call Custom Function from within another Model that hasMany()

Hello, I have a model called Program and that hasMany('ProgramChangelog'). Now, it's known that it's...

0 Likes
0 Replies

Is this a safe and correctly formatted SQL Query in Eloquent?

I needed to turn this SQL Query in to Eloquent and I'm wondering if what I did is safe and correct w...

0 Likes
0 Replies

Eloquent NON object problem

code here: http://laravel.io/bin/0e4jG I am trying to link some tables via relationship with eloquen...

0 Likes
1 Replies

Newbie | “Recommendation Search Process”

Hello I'm relatively new to PHP so please bear with me if this question is stupid :) I'm using/learn...

0 Likes
2 Replies

Invalid argument supplied for foreach()

I'm converting a site to Laravel. It's a giant site and unfortunately, I can't rename existing colum...

0 Likes
8 Replies

Filter search results with eloquent or if not whats the other option

I am successfully displaying search results but I want to offer a way to filter those results with t...

0 Likes
7 Replies

Eloquent Pivot -> Get all items listed from 3th table with true or false

Picture this: user table id username role table id rolename role_user table id role_id user_id...

0 Likes
2 Replies
posted 10 years ago

get total count and then count of group by column

I am trying to figure out how to get the following data from my "employees" table. I need...

0 Likes
1 Replies

Auth error : Call to undefined method Illuminate\Database\Query\Builder::password()

Hello, A BadMethodCallException is thrown when I use Auth::attempt : Call to undefined method Illumi...

0 Likes
1 Replies
Solved

[L5] Are eager loading constraints broken?

I posted this same message on the Laracasts forums but didn't get any replies, thought I would give...

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