Support the ongoing development of Laravel.io →

4,305 Threads

Lazy loaded relation results in "ErrorException Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation"

My ERD is something like this: ControlForm hasMany FormRows FormRow hasMany FormColumns FormColumns...

0 Likes
0 Replies

Using a variable in join function

Hi, I need to perfom a query which includes a join on multiple conditions. Therefore, I try to do th...

0 Likes
4 Replies
Solved

In-query check or code check

Hey, Quick question here! I don't really know what are the best practices on that subject, so I'll l...

0 Likes
4 Replies
Solved

Best way of using model event and eloquent guard

I currently have a form with 3 dropdown menu which allow a user to select his date of birth by day,...

0 Likes
0 Replies

Get array from browser url.

Hello all, Can anyone please send me a bit of code to get array from url? Suppose this is my url :...

0 Likes
3 Replies
Solved

[Package] Eloquent-Typecast

Hey all. Got a little package here to help cast Eloquent model's attributes to the proper PHP varia...

0 Likes
1 Replies

Return records only if id exists in another table

Hello, I have a table "names" like this: names: id | name and a table "bookmark"...

0 Likes
2 Replies

Model validation with traits

I wrote a blog post here which explains how you can take Dayle Ree's model validation code and turn...

0 Likes
3 Replies

Pivot Table relationship

I am having problems with creating a schema / model for one of my projects and would like to get som...

0 Likes
3 Replies
posted 9 years ago

Eloquent query not working

Hey guys, This is probably super trivial, but here goes: I'm following one of Jeffrey Ways great tut...

0 Likes
2 Replies
Solved

Admin filter question

Hello :) I'm making an admin filter to use in the routes. filters.php Route::filter('auth.admin', fu...

0 Likes
1 Replies
Solved
posted 9 years ago

Creating a model called "Event" that extends Eloquents gives me an error. Help?

I have a database table called "events" that holds wedding/exhibition events. I'm using El...

0 Likes
2 Replies
Solved

laravel pagination with ajax call will returns links which dumps all the raw data when clicked on the links.

I have editors = User::with(['editor.credentials','editor.specialties','editor.ratings']);...

0 Likes
1 Replies

Unable to save builder in session to append to queries later

I am terrible at explaining so I will do my best in point form: Each page queries a list of data Us...

0 Likes
0 Replies

OneToMany - Not Showing the data but the full object

Hey there, I am stumped on why my query is sending me back the full object when I do $date->exhib...

0 Likes
5 Replies
Solved

Select every row between two dates.

Hi, I am building a report system and we need to make overviews, statistics and others like that. Us...

0 Likes
1 Replies

soft deleted record resulted in relation

Hi everybody i have two model which called Department and Course, every dept has many courses, and c...

0 Likes
1 Replies

Categories in categories?

Hey guys, I am going to build a new web application, and I have a question about the architecture of...

0 Likes
3 Replies
posted 9 years ago

Could models cache result less than 1 minute?

I'm planning to cache data less than 1 minute, how could I do?

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.

© 2024 Laravel.io - All rights reserved.