Route::get('whereBetween', function () { dd(Book::whereBetween('pages_count', [100, 200])->get()); }); /** * Find books with titles */ Route::get('whereIn', function () { dd(Book::whereIn('title', ['My First Book', 'My Second Book'])->get()); }); /** * Magic where * Using PHP Magic methos a dynamically create where methods on table columns * Only valid when checking equal values */ Route::get('magicWhere', function () { dd(Book::wherePagesCount(230)->first()); }); /** * Query scopes * Defined in Book model */ Route::get('cheap', function () { dd(Book::cheap(11)->get()); }); /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | This route group applies the "web" middleware group to every route | it contains. The "web" middleware group is defined in your HTTP