O'Reilly logo

Learning Laravel 4 Application Development by Hardik Dangar

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

Managing orders

Now as we have authenticated the user, it's time to set up our dashboard and admin area. But first, let's write our group routes so that we don't have to check if user is admin each time we receive a request, and we can then just work on Controllers and Views:

Route::group(array('before' => 'administrationauth'), function() { Route::get('admin/orders', array('as' => 'orders', 'uses' => 'order@index')); Route::get('admin/user', array('as' => 'user', 'uses' => 'user@index')); Route::get('admin/usercredit', array('as' => 'usercredit', 'uses' => 'credit@usercredit')); Route::post('admin/usercredit', array('as' => 'postusercredit', 'uses' => 'credit@usercredit')); Route::get('admin/credit', array('as' => 'credit', 'uses' => 'credit@index')); ...

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