Permalink
Browse files

Update csrf token check.

  • Loading branch information...
1 parent d20f208 commit 7677cff428b55ecd1571207080cba7df233b2d19 @andrew13 andrew13 committed Apr 4, 2013
Showing with 18 additions and 12 deletions.
  1. +18 −12 app/routes.php
View
@@ -21,21 +21,24 @@
# Comment Management
Route::get('comments/{id}/edit', 'AdminCommentsController@getEdit')
->where('id', '[0-9]+');
- Route::post('comments/{id}/edit', array('before' => 'csrf', 'AdminCommentsController@postEdit'))
- ->where('id', '[0-9]+');
+ Route::post('comments/{id}/edit', 'AdminCommentsController@postEdit')
+ ->where('id', '[0-9]+')
+ ->before('csrf');
Route::get('comments/{id}/delete', 'AdminCommentsController@getDelete')
->where('id', '[0-9]+');
- Route::post('comments/{id}/delete', array('before' => 'csrf', 'AdminCommentsController@postDelete'))
- ->where('id', '[0-9]+');
+ Route::post('comments/{id}/delete', 'AdminCommentsController@postDelete')
+ ->where('id', '[0-9]+')
+ ->before('csrf');
Route::controller('comments', 'AdminCommentsController');
# Blog Management
Route::get('blogs/{id}/show', 'AdminBlogsController@getShow')
->where('id', '[0-9]+');
Route::get('blogs/{id}/edit', 'AdminBlogsController@getEdit')
->where('id', '[0-9]+');
- Route::post('blogs/{id}/edit', array('before' => 'csrf', 'AdminBlogsController@postEdit'))
- ->where('id', '[0-9]+');
+ Route::post('blogs/{id}/edit', 'AdminBlogsController@postEdit')
+ ->where('id', '[0-9]+')
+ ->before('csrf');
Route::get('blogs/{id}/delete', 'AdminBlogsController@getDelete')
->where('id', '[0-9]+');
Route::controller('blogs', 'AdminBlogsController');
@@ -45,21 +48,24 @@
->where('id', '[0-9]+');
Route::get('users/{id}/edit', 'AdminUsersController@getEdit')
->where('id', '[0-9]+');
- Route::post('users/{id}/edit', array('before' => 'csrf', 'AdminUsersController@postEdit'))
- ->where('id', '[0-9]+');
+ Route::post('users/{id}/edit', 'AdminUsersController@postEdit')
+ ->where('id', '[0-9]+')
+ ->before('csrf');
Route::get('users/{id}/delete', 'AdminUsersController@getDelete')
->where('id', '[0-9]+');
- Route::post('users/{id}/delete', array('before' => 'csrf', 'AdminUsersController@postDelete'))
- ->where('id', '[0-9]+');
+ Route::post('users/{id}/delete', 'AdminUsersController@postDelete')
+ ->where('id', '[0-9]+')
+ ->before('csrf');
Route::controller('users', 'AdminUsersController');
# User Role Management
Route::get('roles/{id}/show', 'AdminRolesController@getShow')
->where('id', '[0-9]+');
Route::get('roles/{id}/edit', 'AdminRolesController@getEdit')
->where('id', '[0-9]+');
- Route::post('roles/{id}/edit', array('before' => 'csrf', 'AdminRolesController@postEdit'))
- ->where('id', '[0-9]+');
+ Route::post('roles/{id}/edit', 'AdminRolesController@postEdit')
+ ->where('id', '[0-9]+')
+ ->before('csrf');
Route::get('roles/{id}/delete', 'AdminRolesController@getDelete')
->where('id', '[0-9]+');
Route::controller('roles', 'AdminRolesController');

0 comments on commit 7677cff

Please sign in to comment.