In Laravel, if I perform a query:
$foods = Food::where(...)->get();
...then $foods is an Illuminate Collection of Foo
$foods
Foo
As the question above when you are using the where clause you also need to use the get Or first method to get the result.
/** *Get all food * */ $foods = Food::all(); /** *Get green food * */ $green_foods = Food::where('color', 'green')->get();