#passing in collection a as function param gets converted into array
7 messages · Page 1 of 1 (latest)
$this->myCollection = collect($myCollection);
this just converts the array into a new collection
i have already lost the information about what models they are
the issue is that i want to know from what model the item comes
because the collection im passing to the function has different models
and then in my view i have to check the type of the model:
{{-- if it's a Item model --}}
@if (class_basename($item) == 'Item')