'api/web'], function() { Route::get('/taxonomies/all', 'Api\Web\TaxonomiesController@getAll'); Route::group(['before' => 'auth|csrf'], function() { Route::post('/tracks/upload', 'Api\Web\TracksController@postUpload'); Route::post('/tracks/delete/{id}', 'Api\Web\TracksController@postDelete'); Route::post('/tracks/edit/{id}', 'Api\Web\TracksController@putEdit'); }); Route::group(['before' => 'auth'], function() { Route::get('/images/owned', 'Api\Web\ImagesController@getOwned'); Route::get('/tracks/owned', 'Api\Web\TracksController@getOwned'); Route::get('/tracks/edit/{id}', 'Api\Web\TracksController@getEdit'); Route::get('/albums/owned', 'Api\Web\AlbumsController@getOwned'); Route::get('/albums/edit/{id}', 'Api\Web\AlbumsController@getEdit'); }); Route::group(['before' => 'csrf'], function(){ Route::post('/auth/login', 'Api\Web\AuthController@postLogin'); Route::post('/auth/logout', 'Api\Web\AuthController@postLogout'); }); }); Route::group(['prefix' => 'account'], function() { Route::group(['before' => 'auth'], function(){ Route::get('/favourites/tracks', 'FavouritesController@getTracks'); Route::get('/favourites/albums', 'FavouritesController@getAlbums'); Route::get('/favourites/playlists', 'FavouritesController@getPlaylists'); Route::get('/tracks', 'ContentController@getTracks'); Route::get('/tracks/edit/{id}', 'ContentController@getTracks'); Route::get('/albums', 'ContentController@getAlbums'); Route::get('/albums/edit/{id}', 'ContentController@getAlbums'); Route::get('/albums/create', 'ContentController@getAlbums'); Route::get('/playlists', 'ContentController@getPlaylists'); Route::get('/', 'AccountController@getIndex'); }); }); Route::get('/', 'HomeController@getIndex');