sorry more info, Session::get('cart')['wishlist'] should return a Collection object, which should be \Illuminate\Database\Eloquent\Collection instead of lluminate\Support\Collection
Mar 22, 2017
4
Level 1
How to cast Illuminate\Support\Collection to \Illuminate\Database\Eloquent\Collection
really confused about the class naming on the 'support' folder, always have the same name with other classes.
Now what I am trying to do is:
$some = (\Illuminate\Database\Eloquent\Collection::make(Session::get('cart')['wishlist']))::all();
I tried to cast the class to \Illuminate\Database\Eloquent\Collection, but always get an error like this:Non-static method Illuminate\Support\Collection::get() should not be called statically
What I should do then? thanks
Please or to participate in this conversation.