Support the ongoing development of Laravel.io →

4,314 Threads

Adding a "reference table" to a pivot table

Hi guys at the moment I'm hardcoding in the 'unit' column on the 'ingredient_recipe' table. I want t...

0 Likes
3 Replies

Laravel 4 - saving a hasMany relationship

I have the following relations: Discount: <?php class Discount extends Eloquent { pro...

0 Likes
2 Replies
posted 10 years ago

Obtain related object in many to many

I need to obtain the object that are check in "$user->services->contains($service)"....

0 Likes
1 Replies
Solved

Querying a many-to-many relationship

Hello, being new to Laravel, I'm trying to perform a query in Laravel 4's query builder or Eloquent....

0 Likes
3 Replies
Solved

Need variables

Hi, i have a select: $roles = agegroup::all(); The select delivers an object with data. Now i need t...

0 Likes
2 Replies
Solved

Why Laravel save data more then one record at one time?

I use Laravel Eloquent to save data to table store, but it save more then one record at one time. Wh...

0 Likes
1 Replies

I want to send my table schemas to the front-end using in json format. How can I get that schema?

Do I have to write a raw sql query? Or is there a class in laravel that can do that?

0 Likes
2 Replies
Solved

Models that that don't extend Eloquent

Is it possible to create a model that doesn't extend Eloquent? I have need for some models that don'...

0 Likes
4 Replies

Find items that have a set of associated items through hasMany

I have three tables: Video (id, title) Tag (id, title) Video_Tag (id, video_id, tag_id) <-- join...

0 Likes
3 Replies
Solved

Is it possible to use Confide 4.0 with a User class that extends Ardent?

I have a User class that extends a Base class which extends Ardent. I'm toying with the idea of usin...

0 Likes
1 Replies

Laravel auto date time conversion at model level

Whenever i save any date or time into database i convert it into UTC format and save to database and...

0 Likes
1 Replies
posted 10 years ago

Eager loading constraint and ordering it correctly

I have the following query that returns results fine, but the order of the results isn't alphabetica...

0 Likes
1 Replies
Solved
posted 10 years ago

Using pivot data in Fractal transformers

I have users and workspaces on my project, and an is_invite field on the pivot table to tell when so...

0 Likes
0 Replies

Connect to a remote mongo database

Hello there.. I'm trying to connect on a remote database on mongolab server. I aways get that error:...

0 Likes
1 Replies
posted 11 years ago

Is there a shortcut for syncing one-to-many relationships?

I see the sync function which is really handy for managing pivot table relationships. I'm wondering...

0 Likes
3 Replies
Solved

LeftJoin In mongodb laravel

Hi everyone I have problem with mongodb in laravel i use mongodb 'jenssegers' IN MYSQL : i use sql \...

0 Likes
0 Replies

Using Models for noob

Hi, I'm sure this has been asked a thousand times, but I still can't find much out there. I understa...

0 Likes
1 Replies

Polymorphic, Many to Many relationship. Problems setting up --able table

So I have a tag system, and for each user, they can have many tags, and also posts can have tags, so...

0 Likes
2 Replies
Solved

Rating System Model Relationship

I'm trying to set up my website to support ratings on posts from users. I'm not sure what the best...

0 Likes
5 Replies

How to save Eloquent Model with relations in one go?

When saving a model with relations we do something like this; $ship = new Ship; $ship->name = 'E...

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