I have problem when I'm checking if collection is empty or not, Laravel gives me error
"Call to undefined method Illuminate\Database\Query\Builder::isEmpty()".
Tho it work in other Controller, but when controller is in Sub folder is suddenly stops working.
Here is my code:
$group = UserGroup::where('id', $request->group_id)->first();
if($group->isEmpty()){ // I get error from here
return redirect()->back();
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2cEsWYT
via IFTTT
Aucun commentaire:
Enregistrer un commentaire