Support the ongoing development of Laravel.io →

4,303 Threads

ORM where clause on related table with pluck

Hello, how can I use ->pluck('fieldB') in following Laravel code? $Result = TableA::with('tableB'...

0 Likes
1 Replies

Relationship not eager loading

Context I have 3 migrations: Members table: class CreateMembersTable extends Migration { public...

0 Likes
1 Replies

Pivot table attach() without auto sort

Hi, $item->categories()->attach([4,1,2,3]); This insert record order by 1 2 3 4 I want it ins...

0 Likes
1 Replies

Access Constructor from Method

Hello GUYS , I am trying to access those values of the controller , but I have to make variables fir...

0 Likes
1 Replies

SQLSTATE[HY000] [1045] access denied for the user: 'homestead'@'@localhost' (password: YES)

Well I'm new to laravel, & still learning it. Basically when i use php artisan migrate, it migra...

0 Likes
7 Replies
Solved

Laravel state machine package

Hi All, In the last couple of days/weeks I was working on a Laravel and VueJS package to manage the...

0 Likes
0 Replies

Error creating data based on hasMany

Hey guys, Greeting from Indonesia. I have a form in which has name of (in imaginary) id, product_nam...

0 Likes
0 Replies

Connect 3 tables with 2 pivot tables

I'm trying to find all rows in c table (see DB schema) associated with one row in a table. Connected...

0 Likes
5 Replies
Solved

laravel Many To Many relationship with inner relation

I have some problem to get information about item. I read a lot of information on forums stakoverflo...

0 Likes
0 Replies

Eloquent, make rank upgradable!

https://laracasts.com/discuss/channels/eloquent/eloquent-make-items-upgradable Here is more details...

0 Likes
0 Replies

How do I manually create a Paginator in 5

Hi I've looking round for a while now but cant figure this out how do How do I manually create a Pag...

0 Likes
7 Replies
posted 5 years ago

Can't use private access on Eloquent's local scope

I'm japanese student and new to Laravel. I used the Eloquent's local scope like this: use Illuminate...

0 Likes
3 Replies

SetConnection doesn't work in a non-static eloquent context

Hello, I'm trying to do this (Laravel 4.2) : In database.php 'default' => '', In a function $mod...

0 Likes
4 Replies
Solved

How to solve the growing bloated ORM?

At first, my model code may be clear, but later, more and more model associations, more and more eve...

0 Likes
0 Replies

Has Many Through Relationship Depth

Hey Guys, I am just trying to understand the depth of the has many through relationship as well as i...

0 Likes
4 Replies
Solved
posted 7 years ago

Eloquent Polymorphic relationship and eager loading...

Hello there, I'm just wondering a thing... I would like to eager load relationships through a polymo...

0 Likes
2 Replies

Laravel 5.6 Separate Image Upload

How do I upload two separate image files to different file locations and save to database? Everythin...

0 Likes
0 Replies

Laravel Eloquent Relationship

$this->belongsTo('\App\Models\Thing','foreign_key', 'other_key'); Can anyone please explain this...

0 Likes
2 Replies

call to undefined method and parse error

I have 3 tables: users, category and profile tables. The profile table has user_id and category_id a...

0 Likes
1 Replies
posted 5 years ago

Models propeties and where are they?

I'm new to Laravel. I am trying to understand if I create a model called Cat, and the cat has a prop...

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