You can simply use YourModel::all(); to select all records from table with Laravel Eloquent.
Example Usage
$posts= Post::all();
$posts->each(function($post){
//do something
}
This post is submitted by one of our members. You may submit a new post here.
Laravel interview Questions © 2019 - Designed by PSD to HTML