Support the ongoing development of Laravel.io →

4,304 Threads

Listings belong to user AND category

Hi, How do I set it up so that my Listings belong to both to the user who creates it, and a specific...

0 Likes
8 Replies
Solved
posted 9 years ago

BelongsTo relationship with 2 foreign keys

Hi everyone, Well, I bought a database of cities that came with 3 tables countries: country_code...

0 Likes
0 Replies

Call to Undefined Method

Hi Folks, I'm namespacing and refactoring an app and I am receiving a 'Call to undefined method' whe...

0 Likes
1 Replies

Grab a field from a joined table that was joined using with clause

Greetings, I want to know if it's possible without using the raw query builder to do what the title...

0 Likes
0 Replies

Mockery testing child related models

I have just switched over to Laravel from CakePHP and wanted to get some advice on testing related m...

0 Likes
0 Replies

Building dynamic queries with Elo/Query Builder not possible?

Hi, in the past i have build queries like this: if (...) {$q.="AND (city='New York' OR city='De...

0 Likes
1 Replies

Inheritance

I have two classes. A and B. The class A extends Laravel, the class B extends A. They rappresent two...

0 Likes
0 Replies
posted 9 years ago

HasMany > BelongsTo through relationship

I have the following tables: users: - id requests: - user_id - listing_id listings: - id...

0 Likes
3 Replies
Solved

Can't return a simple many-to-many relationship value

Hello! First of all thanks for the interest in my topic. I think that this question is easy. I have...

0 Likes
2 Replies
Solved
posted 9 years ago

Paginator::make() returning so much data it crashes the browser!

I am doing something simple like the following: // Controller $activities = Activity::all(); $activi...

0 Likes
8 Replies
posted 10 years ago

hasManyThrough relation

Is there any way to get all relational data with hasmanyThrough of third model that has many records...

0 Likes
1 Replies
posted 10 years ago

hasManyThrough with two belongsToMany

Hi there, company id name users id name roles id name company_user company_id user_id role_u...

0 Likes
1 Replies

Has Many Through Pivot

Imagine: Category can have many Products, Products can have many Series - so basically, Category can...

0 Likes
1 Replies
posted 9 years ago

Help with Eloquent relationships

I have the following tables products variants attributes options option_variant Look at this sqlfidd...

0 Likes
1 Replies

Did I find a bug in Eloquent? ID is not being set correctly using a hasManyThrough relationship and paginate.

Hi there, I have the following three models and relationships set up. class Customer extends \Eloque...

0 Likes
2 Replies

Ecommerce With admin panel

hi can anybody help me to built shopping cart with admin panel or is there any reference link where...

0 Likes
3 Replies

How can I do this SQL query whit Eloquent?

Hello, Im new whit laravel, and I would to like do this query, in SQL it would be something like thi...

0 Likes
3 Replies
Solved

3 table relationship question

I am trying to figure out how to get a specific 3 table relationship working. I have a business list...

0 Likes
3 Replies

What is the easiest way to add the count of records that matched the whereIn to this model chain?

I have this eloquant model chain which works fine but I would like to add the count of matched recor...

0 Likes
0 Replies

Using $this when not in object context | Repository & Command Bus

I am using Laravel Commander to use the command bus to handle everything in an app I am building. I...

0 Likes
1 Replies
Solved

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.