#4.2 has-many-through relation using Pivot model | Laravel Eloquent Relationships

  Рет қаралды 10,837

QiroLab

QiroLab

Күн бұрын

Пікірлер: 26
@surajsjdhv
@surajsjdhv 4 жыл бұрын
Thanks! I couldn't find the proper documentation anywhere about this, but pivot model solved it. TIP: You can directly create pivot table through artisan command with 'php artisan make:model Team --pivot'
@kristofszobacsi5123
@kristofszobacsi5123 4 жыл бұрын
you wrote make:mode at 8:10...and it worked...i mean, how????
@Ehsankhan0577
@Ehsankhan0577 3 жыл бұрын
nice tutorial. your way of explaining is good...please keep it up
@tijubrains
@tijubrains 3 жыл бұрын
Thank you soooooooo much Harish. This is really helpful.
@QiroLab
@QiroLab 3 жыл бұрын
Glad to hear that
@TimKariuki
@TimKariuki Жыл бұрын
Suppose I want to get the Users as well as Tasks. How should that be achieved using this?
@hopnguyen5948
@hopnguyen5948 3 жыл бұрын
thank u so much, its hard to remember but its useful!
@nuruzzanamhimel5911
@nuruzzanamhimel5911 2 жыл бұрын
thx u sir.... for your kindness
@scottmcdaniel864
@scottmcdaniel864 4 жыл бұрын
what db tool are you using?
@QiroLab
@QiroLab 4 жыл бұрын
Here I am using Chrome MySql extension, because it is very light, Now I have switched to TablePlus, it is also good.
@muhammadaftab9252
@muhammadaftab9252 Жыл бұрын
Thank you so much.
@QiroLab
@QiroLab 11 ай бұрын
Thank you! Cheers!
@kamleshpaul414
@kamleshpaul414 4 жыл бұрын
which intelicence u r using and is it paid.?
@QiroLab
@QiroLab 4 жыл бұрын
I am using free version of "PHP Intelephense". Along with that I have also installed "PHP Namespace Resolver", "Laravel Model Snippets".
@kamleshpaul414
@kamleshpaul414 4 жыл бұрын
@@QiroLab thanks
@tothebone4613
@tothebone4613 4 жыл бұрын
What if employee have many assignment that have one to many relation table such as position, document and ship all in assignment tablle what type relation is this polymorph or can i use has many through ?, . ->employe id assignment id ->assignment position_id ship_id document_id kindly need your knowledge thank you.
@QiroLab
@QiroLab 4 жыл бұрын
For that you should use polymorphic relationships.
@tothebone4613
@tothebone4613 4 жыл бұрын
@@QiroLab do you have any course to implement this with crud ?
@idrissjouid3798
@idrissjouid3798 4 жыл бұрын
Hi, I think this will not be correct. For example user1 has 2 projects and different tasks in this 2 projects. Now if you select project1->tasks then you will receive all the tasks of project1 and project2.... Because there is no relation between projects and tasks...
@idrissjouid3798
@idrissjouid3798 4 жыл бұрын
@Ayoub Bousetta yes but i mean the relationship method is not correct in this video... if the answer is the where() method as you say so i can use it without declaring any relationship method.I can use $project->where ('user_id', Auth->user()->id) and don't declare any relationship method in my models.
@FindWebX
@FindWebX 3 жыл бұрын
Thank you very much
@bishalbhattarai9508
@bishalbhattarai9508 2 жыл бұрын
I have 3 tables ...Movie,Role and Crew Movie belongsToMany Role Role belongsToMany Crew I want to fetch crew for movie ???? how is this possible can you help me?
@SaiyanJin85
@SaiyanJin85 4 жыл бұрын
Great!
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 43 МЛН
Laravel Eloquent: Deeper Relationships with One Query
10:37
Laravel Daily
Рет қаралды 144 М.
Laravel Polymorphic Many-to-Many Performance: Query Pivot Table
5:54
Eloquent: Query 3-Level Relations with hasManyThrough and withCount
7:36
Laravel: Change Two Symbols to Boost Eloquent Speed
6:34
Laravel Daily
Рет қаралды 87 М.
Laravel Advanced - Has Many Through Relationship
20:03
Laratips
Рет қаралды 7 М.