Support the ongoing development of Laravel.io →

4,314 Threads

Eloquent relation among three models

Hello guys, User has many Field Field are fixed (10 to 15), has many User and Value Value belongs t...

0 Likes
1 Replies

Eloquent construct format column

Hey guys. I have a question, is there a way to do some custom stuff over the values that eloquent re...

0 Likes
0 Replies

Trying to collect data from a many-to-many relationship

UPDATE 09/06/15 Hi, i'm quite new to Laravel, I'm trying to perform a query in Laravel 4 with Eloque...

0 Likes
3 Replies

Get featured listings from sub categories (while parent category)

Hello guys, I'm trying to show featured listings from sub categories in a category view. I can check...

0 Likes
3 Replies
posted 9 years ago

Laravel 5 hasMany() problem

I'm having trouble with Eloquent's hasMany() method. In short, I'm making a video website and curren...

0 Likes
5 Replies
Solved

Laravel 5 - Query Exception, wrong table used

Hi. I have a problem using the built in user support. I created a table "user" in my datab...

0 Likes
3 Replies
posted 10 years ago

How can i do this???? $this->hasMany( ) ->select()->where()

Basically, this an event app where customers can buy events and/or flights, hotels, etc......So you...

0 Likes
10 Replies
Solved

FatalErrorException in compiled.php line 9437: Class 'User' not found

I am trying to query the database to get all suggestions along with the users table information howe...

0 Likes
2 Replies
Solved
posted 9 years ago

Is it good practice to have such queries in laravel views?

@foreach( $users as $user) <td class="text-center" > {{{ Order::whereAff...

0 Likes
4 Replies

Eloquent Union Laravel 5

hello there, i am newbie there. im working with laravel 5, and i got a problem when i developed my w...

0 Likes
0 Replies

save() don't work on polymorphic retlation

Hi, I want to save records for polymorphic tables. <?php namespace App\Commands; use App\Command...

0 Likes
0 Replies

Dynamic menu and submenu

I'm having a hard time getting my dynamic menu to work, it seems the array returned by database is n...

0 Likes
5 Replies
Solved

CI to Laravel and migration

hi I'm kindly new in this community and I have a question about laravel I have already an applicatio...

0 Likes
1 Replies

How to setup Eloquent Models for self-joins.

I have a Contact(contacts) Model. I have a pivot Model ContactContact(contact_contact). I am trying...

0 Likes
6 Replies

if more than 2 column selected in list

I have this eloquent model query public function getemployee(){ $id = $_POST['id'];...

0 Likes
4 Replies
posted 9 years ago

Revisionable doesnt work with specific model?

Hi! I have a system and i want to keep track on revisions. I found the extension Revisonable and its...

0 Likes
1 Replies

attach user_id to profile table

how i can attach user_id to profile table when the user register because the register in laravel 5 b...

0 Likes
1 Replies

Clean way of combining an array for a listbox

Most of the listbox I use, make use of the lists function i.e. ->lists('id', 'name') Is there a n...

0 Likes
2 Replies

->withPivot(column)->sum(column)? How to accomplish?

Hi folks, I'm very new to laravel and just trying to sum a column within my pivot table of a model....

0 Likes
0 Replies

How to handle updating User object properly? Would this work?

I've got a form to create a new user - it has name, email, a user role and password information. Tha...

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