Answer the question
In order to leave comments, you need to log in
How to get multiple models in Laravel 5?
Tell me how to get several models in one LengthAwarePaginator Get
the collection out, I do this:
$clinic = Actions_clinic::select('*')->get();
if($clinic){
$clinic->load(
'actions_clinic',
'actions_clinic.districts',
'actions_clinic.metros'
);
}
$analyze = Actions_analyze::select('*')->get();
$collection = new Collection;
$actions = $collection->merge($clinic)->merge($analyze);
return $actions;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question