I have a static function in one of my Model named invoice which is as follows public static function...
TL;DR how to address the same table's field in the additional condition like this: $this->hasMany...
I have a M2M relationship from User->Clubs with an intermediate table which contains the join dat...
Hey, lately I have got a lot of troubles with models that use the SoftDeletingTrait. If I want to ha...
Good morning to all guys! I have two table. "user" and "user_user". In the table...
Hey all, <?php $offers = Car::with(array('Bids' => function($query){ $query->o...
Hello, I have 2 tables (or more) with relations, user_details and addresses. class UserDetail extend...
hi all, i'm want to do pagination with eager loading and i also want to show like 5 next article lin...
I know about the (saving,saved,updating,etc.) model events. But my problem is slightly different. I'...
Hi I'm having trouble converting a mysql query that I've been working on into a laravel eloquent que...
hi,so i have 1 table that function as my article categories and there is one column that show number...
Hello, I am unable to figure out how to perform one query, where I get objects from model, based on...
available here: https://github.com/jrmadsen67/mahana-hierarchy-laravel a few things to tweak on it y...
I want to combine the 2 and get trader count and deposit_amount sum per day $getearnings = DB::table...
Good morning to all. By executing this query: $post = DB::table('post') ->join('user', 'post.id_u...
Hello, I have my user model referencing a table with a UserID as the PK. The same table has another...
Hi all, I want to perform this complex request in Laravel 4.2 : SELECT i.serial, z.name, count(im.da...
I have three tables: 1. Users Table field: user_id 2. Likes Table field: item_id...
Hi guys, I'm having difficulties working with the query builder syntax. I'm trying to convert this...
Solutions given in the past year. Excluding solutions from thread authors.
Select a tag below to filter the results
The Laravel portal for problem solving, knowledge sharing and community building.
The community