Support the ongoing development of Laravel.io →

4,314 Threads

Multiple relationships on same model

What I try to do is a relationship with eloquent between a model called "Location" and a m...

0 Likes
1 Replies
Solved

Relationship scope

Hi, I have two models, "Article" and "ArticleDescription". "Article" h...

0 Likes
2 Replies

Two user authentication systems

I have a system I will be developing that has an admin side and a client side. The users for each en...

0 Likes
0 Replies

sqlsrv unable to use created_at / updated_at

I am using sqlsrv to connect to Microsoft SQL server 2008. If I put the following in my view {{ $use...

0 Likes
1 Replies

jason to unlimited sub item

Hi for example I have controller and in this we have below code $categories=Category::with('parent....

0 Likes
0 Replies

Query builder laravel 5

I have a SQL, for a table name "students" SELECT Institution_Name, Count(Institution_Name)...

0 Likes
0 Replies

how to store data of form in database?

i'm unable to store data of a signup form in my database table, plz help

0 Likes
1 Replies

Eloquent find() returns result even with wrong ID

I'm running a query on Eloquent, I search on a table for a row ID, On Eloquent I'm using: Video::fin...

0 Likes
4 Replies

Invalid argument supplied for foreach() in Distinct Jensseger Mongodb

Well, i don't know why it's happening. I have no idea at all. I got a code in my controller like thi...

0 Likes
1 Replies
Solved

hasmanyThrough through multiple tables that have "belongsToMany" in between???

QUESTION: How can i filter this that if i fetch "$user->subjects" i get all subjects to...

0 Likes
1 Replies

Eloquent ORM - Complex queries

Hello, I have the following query: DB::select("SELECT * FROM mod_dns_records WHERE (scheduled =...

0 Likes
0 Replies

how to extend Eloquent Builder

I am new to Laravel, and am migrating an existing app done in another framework. I want to extend th...

0 Likes
0 Replies
posted 10 years ago

Conditional relationships with Eloquent

What I want to accomplish is: I have a list of project Project has a column "type" and it...

0 Likes
6 Replies
Solved
posted 10 years ago

Laravel 5 - Eloquent Models Inheritance (Accessing columns from abstract parent class in derived classes)

Hello. I'm working on a little project and ran across a problem. (See the ERD for the design). I wan...

0 Likes
0 Replies
posted 10 years ago

[L5] Schema builder to Eloquent

I would like to understand how to rewrite this query created with "Scheda builder", with E...

0 Likes
0 Replies

Model events on deleting not work

I need when deleting a record it will also create a deleted_by value. [company table] | name | creat...

0 Likes
6 Replies
posted 10 years ago

Understanding Eager Loading

Hello everyone, I'm very new at Laravel and trying to understand Eager Loading. I've just added some...

0 Likes
0 Replies
posted 10 years ago

Error after moving users model to custom namespace

Hi All, I'm currently building out a new appl in Laravel 5 and for ease of organization have moved a...

0 Likes
2 Replies
Solved

Fetch Data from Database using Ajax in Bootstrap Modal

While Fetching data from database and displaying it on table rows, we use @foreach(). But what if th...

0 Likes
1 Replies

Database helpers

Hi guys! I am trying to figure out how to create a class that contains methods with commonly used qu...

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