Support the ongoing development of Laravel.io →

4,314 Threads

posted 10 years ago

One to Many query and foreach

The property or inmueble has several photos, I want to access these fotos, are these two the same?,...

0 Likes
1 Replies
Solved
posted 10 years ago

Relationship problems

Not literally, of course, well, maybe. But that's neither here nor there. Here's my issue: dd($post-...

0 Likes
3 Replies
Solved

Logical test returning false but query returning true

Hello! I can't figure out why the mysql query is returning results when it shouldn't, here is the th...

0 Likes
1 Replies
posted 10 years ago

Many-to-many relationships using a pivot table w/ natural foreign keys?

I need some help with a many-to-many relationship using a pivot table that contains natural foreign...

0 Likes
5 Replies
Solved

Is this possible with eloquent? Double/triple join of the same table to itselve with where conditions and the need of a recalculated date...?

Hello, I have an orderarticles table (The article rows of an order). The selected fields are only to...

0 Likes
2 Replies

Filtering Eloquent Collections by unique column value after retrieval from database

From the docs we know that we can filter Eloquent collections after retrieval from database by apply...

0 Likes
3 Replies

Eloquent relations (eager loading) error

I have strange error in my laravel project because, in my machine, everything works fine but, in the...

0 Likes
1 Replies

Laravel - MongoDb get count of related_ids

I'm using the Laravel-MongoDb package with a many to many relationship between "expeditions&quo...

0 Likes
0 Replies
posted 10 years ago

Polymorphic many to many pivot

Is there support for extra columns on the pivot table, in the case of polymorphic many to many relat...

0 Likes
1 Replies
Solved

Database Schema, Separate or Condensed Content

Hello, As the topic states, I'm attempting to design my database. I'm trying to plan a rebuild of my...

0 Likes
1 Replies

Searching not work correctly

Hi, I've been looking around and try an error for long time, and I think that it's time to reach out...

0 Likes
4 Replies
posted 10 years ago

How can I map array of strings in Eloquent without making a new class with relationship for it?

I want to have an array of strings as a public member of my Word class (let's call it examples), and...

0 Likes
0 Replies

Counting row for hasmany relationship

so i doing eloquent with hasmany relationship like this $jejarings = WilayahCuprimer::with('Cuprime...

0 Likes
0 Replies

Four tables relations

Hello! I have four tables: users: id, username roles: id, name domains id, title domainsAssignedRole...

0 Likes
2 Replies

One to One relationship using conditions Eloquent/Mongodb

I'm using Laravel-Mongodb with a parent Subjects table (MySql) having a one to one relationship with...

0 Likes
0 Replies
posted 10 years ago

what is the source of this method in laravel?

I saw a method in a laravel project that convert the actual date to "xxx minutes ago" {{ $...

0 Likes
4 Replies

Use Eloquent to attach array to query

I have a USER table, and ITEMS table, and a Likes table. I'm randomly taking 9 items from the Items...

0 Likes
2 Replies

Union two date of two different tables

Hello guys. I have a table "post" and the table "post_user." In the table "...

0 Likes
0 Replies

Database Table custom naming convention Laravel Eloquent

I'm trying to retrieve data from a table called completion_date using Eloquent. My Model name is Com...

0 Likes
1 Replies
Solved

hasManyThroughrelationship return wrong SQL sentence

I would like to get some data for tables that dont have a directly relation. The context is the foll...

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