Support the ongoing development of Laravel.io →

4,308 Threads

Deleted at defaulting to zero?

Hi. I'm migrating an old database to a Laravel-based app. One issue I'm coming across is that during...

0 Likes
0 Replies

Optimize sql Query

Hi I have one scenrio. their is static content in database table. My table look like this. id ti...

0 Likes
1 Replies
Solved

How to order the first table by a column in the second table

Hi, i have a little problem trying to order the first table based on the second table column. Table:...

0 Likes
2 Replies
Solved

Cannot catch DB exceptions inside seed class

For some reason, I cannot catch DB exceptions inside a seed class: the code never enters the catch b...

0 Likes
1 Replies

How to return a single value from a scope?

This is what I have done so far: public function scopeCityName($query) { return $query ->join...

0 Likes
1 Replies
Solved
posted 11 years ago

How do I compare Collections?

I have two Collections (\Illuminate\Database\Eloquent\Collection) called $admins and $users. Both co...

0 Likes
0 Replies

Confirmation on delete help

I am trying to get a bootstrap 3 modal to popup with buttons confirming delete before deleting cust...

0 Likes
8 Replies

Changing accessors with setAppends while eager loading?

I would like to prevent some users from accessing certain database columns based on role management....

0 Likes
0 Replies

Easy problem with a relation one to many

Hi all i'm stuck in a stupid problem that drive me crazy: Users Model class Users extends Eloquent i...

0 Likes
7 Replies

Getting hasMany relationship data from hasOne relationship

Hi All, New to Laravel and MVC so I'm a bit stuck and hoping I can get a solution from you. I have 3...

0 Likes
4 Replies
Solved

Model/Database Design question

Hi everyone, I'm currently developing a small real estate app, and before starting, I was wondering...

0 Likes
2 Replies
posted 11 years ago

Call to undefined method associate()

Hi, I'm trying to associate Users with workgroups... but I keep getting error call to undefined meth...

0 Likes
2 Replies
posted 11 years ago

scope with relationships

Hi everyone, I have some issue with relationships. this my database: user id - integer name - stri...

0 Likes
0 Replies
posted 11 years ago

Count on an associated model

I'd like to get the number of times a tag is entered in the database. Not for a single tag but for a...

0 Likes
0 Replies

How can I get the id from hasMany relationship?

Don't know if I'm doing this right. I have two models: Projects and Clients. Projects table has the...

0 Likes
3 Replies

"Depth to great" when querying relations

I get the message "depth too great" when querying a couple of relations. These are my mode...

0 Likes
2 Replies
Solved

Dynamic validation rules

I need to have some validation rules based on configuration files (those at app/config), so the rule...

0 Likes
2 Replies
Solved

Null value for deleted_at to be '0' and not 'null'

As I have asked a few times before, I'm developing a website/CMS to a game server for which I can no...

0 Likes
6 Replies
Solved

Is there a way to order by data in a pivot table

Hi, I have a pivot table that links users to products. The table has timestamps that are updated wh...

0 Likes
1 Replies

best practices or common conventions around schema documentation?

Hi Laravel Community, As one of your newest members I'm curious if there's common conventions here a...

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