Laravel Output Prediction Easy +10 XP
Eloquent All
What does this return?
LaravelRead-only
$users = User::all();
What is the output?
Show answer and explanation
Answer: Collection of all User records
User::all() returns an Eloquent Collection containing all records from the users table.
Hint: all() retrieves every row as a Collection.
What this challenge tests
Output Prediction in Laravel: eloquent, collections.