Support the ongoing development of Laravel.io →

4,311 Threads

Protect yourself against destructive migrations?

If you are deploying a new version of your site, and part of your migrations involves deleting table...

0 Likes
1 Replies

Laravel Auth keep returning false

Hi.. i recently changed one of my existing project to Auth. While testing i found out that all my us...

0 Likes
2 Replies

Eloquent Query Relation Eager Loading

to avoid the eager loading probleme i load all relation with my object. the relation is : Transactio...

0 Likes
0 Replies

Eager Loading with 3 Models

Hey, I have 3 Models that are related so : "Tutorial" belongs To "Title" that be...

0 Likes
1 Replies
Solved

Combine Foreach Loop and Eloquent to perform a search

I am quite confused about when, where and how I should be writing this query.. This is my array from...

0 Likes
6 Replies
Solved

Laravel, eloquent, returning a value from a select with a inner join with pivot table

Hello, I'm new with Laravel and im'trying to use as best as I can, but I'm having trouble getting...

0 Likes
2 Replies
Solved

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

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

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 9 years ago

Eager loading multiple relationships from a specific model.

Hello! I currently have an eloquent model that has two has_many relationships. The models that are a...

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

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

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

IDs in Laravel Eloquent

Hi folks! I have column "category" in "posts" table, each post can have multiple...

0 Likes
1 Replies
Solved

Which is the correct way?

Hello, I have a problem I want to discuss here. At first I thought an answer given in chat might be...

0 Likes
1 Replies

Suggestions for based based rows.

Hello, I want to have rows which are based on a user, so for example if I do a find I would see MY r...

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.

© 2024 Laravel.io - All rights reserved.