From c0953948d7008100ab4fcb4c5df6076ed7e69e3c Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Thu, 27 Dec 2018 21:33:47 -0500 Subject: * Routes: Create edit route --- laravel/routes/web.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'laravel/routes') diff --git a/laravel/routes/web.php b/laravel/routes/web.php index 730f622..6493350 100644 --- a/laravel/routes/web.php +++ b/laravel/routes/web.php @@ -14,9 +14,12 @@ Route::get('/', function () { return view('welcome'); }); -Route::get('/song/{song}', 'SongController@show')->name('song.show'); +Route::post('/new/song', 'SongController@post')->name('song.postnew')/*->middleware('can:create,App\Song')*/; Route::get('/playlist/{playlist}', 'PlaylistController@show')->name('playlist.show'); -Route::post('/new/song', 'SongController@post')->name('song.postnew'); +Route::get('/s/{song}', 'SongController@show')->name('song.show'); +Route::post('/s/{song}', 'SongController@update')->name('song.update')->middleware('can:update,song'); +Route::get('/s/{song}/edit', 'SongController@edit')->name('song.edit')->middleware('can:update,song'); +Route::get('/song/{song}', 'SongController@oldShow')->name('song.oldShow'); Auth::routes(); -- cgit 1.4.1