O'Reilly logo

Mastering Laravel by Christopher John Pecoraro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Route caching

Route caching helps to speed things up. In Laravel 5, a caching mechanism was introduced to speed up the execution.

The example routes.php is shown here:

Route::post('reserve-room', 'ReservationController@store'); Route::controllers([ 'auth' => 'Auth\AuthController', 'password' => 'Auth\PasswordController', ]); Route::post('/bookRoom','ReservationsController@reserve', ['middleware' => 'auth', 'domain'=>'booking.hotelwebsite.com']); Route::resource('rooms', 'RoomsController'); Route::group(['middleware' => ['auth','whitelist']], function() { Route::resource('accommodations', 'AccommodationsController'); Route::resource('accommodations.amenities', 'AccommodationsAmenitiesController'); Route::resource('accommodations.rooms', 'AccommodationsRoomsController'); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required