Комментарии:
Super excellent bro
ОтветитьSo this query is not dynamic? What happens when n depth level? You assume there is certain depth because you are not using recursion???
Ответитьplz name of intro music
ОтветитьFantastic. That's what i'm looking for days. Thank you/
ОтветитьThanks a lot from Bangladesh for this more essential video❤️
Ответитьthanks a lot . it is very good.
Ответитьwhere is jquery
ОтветитьOh what the bad code.
ОтветитьThanks!
Ответитьcan make crud example sir please this i need
ОтветитьIf we are in a child catagory. We like to go back in parent category then how we can show ? Like i am in 4 number sub catagory.. the how i can show 4》3》2》1》0 ?
ОтветитьHi, can you show the blade part of this query to show how it will be working on a navigation of a website?
Ответитьgreat
ОтветитьVery much Helpful
Ответитьquality!
ОтветитьThis is very good but i have one problem in this way, like orderBy or paginate is not working in this way, if you have another way to implement paginate.
ОтветитьYou can use nested with on your relation like this:
public function children(): HasMany
{
return $this->hasMany(Category::class, 'parent_id', 'id')->with('children');
}
public static function getThree(): array
{
return Category::whereNull('parent_id')->with('children')->get()->toArray();
}
This solution avoid the n+1 query problem. If you have 3 nested, only 3 sql requests...
Please sir, how can we get the count of each category items with their subcategories. Anyone please
ОтветитьThanks nice solution!
Ответитьthank you very much ... could you plz make video for showing the tree in blade :)
Ответить