Support the ongoing development of Laravel.io →

4,314 Threads

Eloquent Join Table.

I have 2 Tables User id full_name Post id user_id title content How to find out User.full_name f...

0 Likes
2 Replies
Solved

Search function in API

I'm willing to implement a search function with a Integration of a school API. in other words. I'm w...

0 Likes
6 Replies
Solved

I extend Ardent, how to extend a other class

I use Ardent for my models, but i want to use this packages: https://github.com/lazychaser/laravel-n...

0 Likes
0 Replies

How to store ip address at Laravel?

So I want to store users ip in my database, but I coulnd create VARBINARY(16) in my schema builder....

0 Likes
2 Replies

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 10 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 10 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 10 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 10 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 10 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

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.