Support the ongoing development of Laravel.io →

4,606 Threads

retrieve all children of hasMany relationship

Using $posts = Post::find($id)->comments()->get(); i can get children of single using $posts...

0 Likes
3 Replies

Working with Database with Several Schema's and Tables with No Foreign Key Relationships

Hello Community... New guy here working on private project that is far simpler that my work scenario...

0 Likes
0 Replies

Ask user/password for migrations

Is there a way to make a command like php artisan migrate:install --database['mysql_bis'] asks for c...

0 Likes
0 Replies

Join Category Table on Articles query.

I am trying to join two tables so that I can get the article name and slug, with only one query as I...

0 Likes
2 Replies
Solved

Shortcuts in eager loading?

I know that I can use the below to eager load relationships, but how do I add "shortcuts"...

0 Likes
1 Replies

Many to many relationship with extra field

I am providing an example there are two tables paper and question in paper table {id, name} in quest...

0 Likes
3 Replies
Solved

User Relationships and Fields Question

I'm creating a relationship between a User model and Post model. I created the relationship as foll...

0 Likes
3 Replies
Solved

Get model->id in FormRequest

How can I get the current model record id to be used in public function rules() {} The rules are in...

0 Likes
1 Replies
posted 10 years ago

Drag and drop product-images save DB.

Hi all, i have an issue with saving the position_id for the product images, i'm trying in a way of d...

0 Likes
1 Replies

Checkbox in laravel 5

halo everyone, is there any way to retrieve database using mySQL and show it in checkbox?

0 Likes
1 Replies

whereHas chaining and orWhere

Trying to query a model with a lower level relationship (agreement) and I cannot seem to get chainin...

0 Likes
2 Replies
Solved
posted 10 years ago

MSSQL persistent connection

Hi, I have trouble to retrieve database records from MSSQL. I'm connecting to an ERP database where...

0 Likes
0 Replies

Best practices for checking if Eloquent returns records

Hi all, I'm really curious how the other Laravel developers are checking if an Eloquent query return...

0 Likes
2 Replies

Time format in eloqunet HH:MM

How can i transform this format HH:MM:SS to this format HH:MM with laravel eloquent. Should i use RA...

0 Likes
0 Replies

Error with the function find($user_id)

Hi, when I tried to access this http://localhost:8000/user/3/edit url in my app, I'm getting this er...

0 Likes
5 Replies
Solved
posted 10 years ago

Laravel 5 issue with wherePivot

I am working with Laravel 5 and I am having issue getting ->wherePivot() to work on a Many-to-Man...

0 Likes
0 Replies

Session persistence with database driver

Locally, I use the file driver to store my sessions and it works fine. On production however, the st...

0 Likes
12 Replies
Solved

Create migration with and without prefix

I need to create a database that has ALMOST all tables with a prefix, but some tables can't have it...

0 Likes
2 Replies

Preventing Bots from Registering

So, I'm wondering what the standard practice is for preventing bots from registering accounts, or us...

0 Likes
3 Replies

Laravel 5, nested model with parent-child relationship

Hello everyone, I face the current problem: I'd like to query A parent article with all it's childre...

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.