Support the ongoing development of Laravel.io →

4,314 Threads

Excessive queries in Laravel 4.2. What am I doing wrong?

So, I have this relationship: public function publishedAlbums() { return $this->hasMany('Album')...

0 Likes
1 Replies
Solved

Route model binding & Repositories

Greetings. I am having some confusion about route model binding with/vs repositories. Here's how I...

0 Likes
0 Replies

return data array with ajax?

Is it possible to return a data array in Laravel with ajax? I basically need to pull in some data wi...

0 Likes
3 Replies
posted 10 years ago

return updated model after update it's relations

Hi, For updating one to many translations inside a post i want to return the updated post. Is it nes...

0 Likes
0 Replies

Related object and its parameters

Hello there. I have and relationship, for example $contact->contactData. Not every contact has co...

0 Likes
1 Replies

Opinion about eloquent

Things that I like about eloquent: Fantastic query builder Facilities provided in model the abili...

0 Likes
0 Replies
posted 10 years ago

Eloquent Relationships

Workout app Hello, im working on a workout app and I want to set up my relationships. For example:...

0 Likes
1 Replies
Solved
posted 10 years ago

returning object properties via relationships

I'm new to Laravel (a refugee from Kohana). I really like how Laravel returns object properties in j...

0 Likes
3 Replies
posted 10 years ago

php artisan make:model but Skip the Migration?

The latest version of Laravel now creates a migration whenever you run php artisan make:model. For m...

0 Likes
1 Replies
Solved

Global Scopes

I created new Global scope "StatusableScope" class Post extensd Model { use StatusableTra...

0 Likes
0 Replies

Laravel Model Debug

Is it just me or , maybe misconfiguration , but if I dd() a model, especially if it has a relation,...

0 Likes
0 Replies
posted 10 years ago

Weird relationship

I have the following schema: Customer -> hasMany -> Products Product starred -> zeroOrOne...

0 Likes
0 Replies
posted 10 years ago

Query building problem

I do not get the same results from these two queries. Why is that? In the example i am searching for...

0 Likes
3 Replies
Solved

Add properties to collection objects before sending them as response?

Hey, I am trying to figure out how to add some properties to a Collection of Comment objects. each c...

0 Likes
3 Replies

Scheduled Page and URL

Let's assume that we have a cms system that users are able to create a post but they want to schedul...

0 Likes
0 Replies

Using model classes in Laravel 5

In Laravel 4, I could go: Show::all(); But in Laravel 5, I have to go: \Show::all(); or \App\Model...

0 Likes
3 Replies
Solved

Filtering users country wise using dropdown lists

My user model public function profile() { return $this->hasOne('Profile'); } My...

0 Likes
2 Replies

Check if related entity has any elements.

Hey peeps, new to laravel here (using version 4.2). Now, I have a User model as shown below: <?ph...

0 Likes
1 Replies
Solved

I'm a bit stuck

I am using Laravel 5 and am trying to access the Expedia API. I am find it hard working with Ajax an...

0 Likes
0 Replies

Validate Model Data - Not from form

I have a scenario where I need to validate my model data prior to saving. All examples I can find u...

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.