Support the ongoing development of Laravel.io →

4,311 Threads

My function takes too much time to execute ????

I have a static function in one of my Model named invoice which is as follows public static function...

0 Likes
5 Replies

Relation with extra condition

TL;DR how to address the same table's field in the additional condition like this: $this->hasMany...

0 Likes
3 Replies
posted 9 years ago

ManyToMany with whereHas and pivot

I have a M2M relationship from User->Clubs with an intermediate table which contains the join dat...

0 Likes
2 Replies
Solved

SoftDeletingTrait: What is the point?

Hey, lately I have got a lot of troubles with models that use the SoftDeletingTrait. If I want to ha...

0 Likes
2 Replies

Many to many relationship with Eloquent

Good morning to all guys! I have two table. "user" and "user_user". In the table...

0 Likes
2 Replies
Solved
posted 9 years ago

Sorting Issues with Eager Loading and where statement depending on eager loaded model

Hey all, <?php $offers = Car::with(array('Bids' => function($query){ $query->o...

0 Likes
2 Replies

Update two or more table with relations

Hello, I have 2 tables (or more) with relations, user_details and addresses. class UserDetail extend...

0 Likes
4 Replies

pagination and "up next 5 article"

hi all, i'm want to do pagination with eager loading and i also want to show like 5 next article lin...

0 Likes
0 Replies
posted 9 years ago

A single function to call whenever a Model or any of its related models get updated.

I know about the (saving,saved,updating,etc.) model events. But my problem is slightly different. I'...

0 Likes
3 Replies

convert many to many (but only one related item) mysql query to a laravel query object

Hi I'm having trouble converting a mysql query that I've been working on into a laravel eloquent que...

0 Likes
0 Replies

laravel get route with parameter

hi,so i have 1 table that function as my article categories and there is one column that show number...

0 Likes
3 Replies
Solved

compare table column with sum of hasMany

Hello, I am unable to figure out how to perform one query, where I get objects from model, based on...

0 Likes
6 Replies
Solved

New package - Mahana Hierarchy

available here: https://github.com/jrmadsen67/mahana-hierarchy-laravel a few things to tweak on it y...

0 Likes
0 Replies
posted 9 years ago

How to count and sum in the same query

I want to combine the 2 and get trader count and deposit_amount sum per day $getearnings = DB::table...

0 Likes
3 Replies
posted 9 years ago

Use two table in orWhere function

Good morning to all. By executing this query: $post = DB::table('post') ->join('user', 'post.id_u...

0 Likes
3 Replies
Solved

migrate:rollback command Problem

See url http://laravel.io/bin/JXkw

0 Likes
4 Replies

Self query using Eloqent? Advice needed

Hello, I have my user model referencing a table with a UserID as the PK. The same table has another...

0 Likes
10 Replies
Solved

How to perform this complex SQL request in Laravel

Hi all, I want to perform this complex request in Laravel 4.2 : SELECT i.serial, z.name, count(im.da...

0 Likes
8 Replies
posted 9 years ago

Eloquent joining of multiple tables?

I have three tables: 1. Users Table field: user_id 2. Likes Table field: item_id...

0 Likes
1 Replies

Problem with Eloquent 'orWhere' clause

Hi guys, I'm having difficulties working with the query builder syntax. I'm trying to convert this...

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.

© 2024 Laravel.io - All rights reserved.