paste your migrations
Aug 18, 2017
2
Level 1
One table with multiple pivots tables
Hi everyone, these are relations in my models :
- Medecine belongsto many Pharmaceutic and Pharmaceutic belongsto many Medecine
- Medecine belongsto many Therapeutic and Therapeutic belongsto many Medecine
- Medecine belongsto many Galenic and Galenic belongsto many Medecine
- Medecine belongsto many AdministrationMode and AdministrationMode belongsto many Medecine
- Medecine belongsto many ActivePrinciple and ActivePrinciple belongsto many Medecine
Pharmaceutic is working faster in all case -:)
My problem is there, when i execute this type of query in my controller for other relations :
$Galenic= Galenic::Find(1);
$Medecines= $Galenic->medecines()->orderBy('field1', 'asc')
->paginate(10);
return view('page', compact('Medecines'));
The view is generating data results witout any error but is STILL LOADING FOR SEVERAL MINUTES. What im missing ?
I think that i was clear
Help me please !
Please or to participate in this conversation.