<?php /* |-------------------------------------------------------------------------- | Routes File |-------------------------------------------------------------------------- | | Here is where you will register all of the routes in an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the controller to call when that URI is requested. | */ Route::bind('songs', function ($slug) { return App\Song::whereSlug($slug)->first(); }); //Route::get('/','PagesController@index'); //Route::get('about','PagesController@about'); //Route::get('songs','SongsController@index'); //Route::get('songs/{song}','SongsController@show'); //Route::get('songs/{song}/edit','SongsController@edit'); //Route::patch('songs/{song}','SongsController@update'); $router->resource('songs', 'SongsController'); //Route::get('music',['as'=>'songs_path', 'uses'=>'SongsController@index']); //Route::get('music/{song}',['as'=>'song_path', 'uses'=>'SongsController@show']); /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | This route group applies the "web" middleware group to every route | it contains. The "web" middleware group is defined in your HTTP