/** * Display the list of the menus available * * @return Response */ public function list_menus() { $l = MenuLink::all(); return View::make('admin.menu', ['links' => $l]); }
<?php /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the Closure to execute when that URI is requested. | */ if (Schema::hasTable('menu_links')) { $twig = app('twig'); $twig->addGlobal('links', MenuLink::all()); } Route::get('/', 'MainController@home'); // All user related resources Route::resource('users', 'UsersController'); Route::get('signout', 'UsersController@signout'); Route::get('search', 'MainController@lookup'); Route::get('recover-password', 'UsersController@recover_password'); Route::post('recover-password', 'UsersController@recover_password_post'); Route::post('signin', 'UsersController@signin'); Route::get('activation/{code}', 'UsersController@activation'); Route::get('p/{page}', 'MainController@page'); Route::get('news/{id}', 'MainController@news'); // Artist related routes Route::get('artist/new/', array('before' => 'auth|fresh|isArtist', 'uses' => 'ArtistsController@new_artist')); Route::post('create/album/', array('before' => 'auth|fresh|isArtist', 'uses' => 'ArtistsController@create_album')); Route::get('delete/album/{id}', array('before' => 'auth|fresh|isArtist', 'uses' => 'ArtistsController@delete_album'));