From 8ca5c6c25e8763ec062538eeaa3540e5349b2830 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 14 Dec 2016 04:32:10 -0800 Subject: [PATCH] Moved routes to new new routes files for 5.3 --- routes/api.php | 18 ++++++++++++++++++ routes/console.php | 18 ++++++++++++++++++ app/Http/routes.php => routes/web.php | 16 +++++++++------- 3 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 routes/api.php create mode 100644 routes/console.php rename app/Http/routes.php => routes/web.php (99%) mode change 100755 => 100644 diff --git a/routes/api.php b/routes/api.php new file mode 100644 index 0000000000..6b907f390b --- /dev/null +++ b/routes/api.php @@ -0,0 +1,18 @@ +user(); +})->middleware('auth:api'); diff --git a/routes/console.php b/routes/console.php new file mode 100644 index 0000000000..75dd0cdedb --- /dev/null +++ b/routes/console.php @@ -0,0 +1,18 @@ +comment(Inspiring::quote()); +})->describe('Display an inspiring quote'); diff --git a/app/Http/routes.php b/routes/web.php old mode 100755 new mode 100644 similarity index 99% rename from app/Http/routes.php rename to routes/web.php index 9080e38f71..e17be441ae --- a/app/Http/routes.php +++ b/routes/web.php @@ -802,7 +802,9 @@ Route::group([ 'prefix' => 'admin','middleware' => ['web','auth']], function () Route::post('custom_fields/{id}/associate', ['uses' => 'CustomFieldsController@associate','as' => 'admin.custom_fields.associate']); Route::get('custom_fields/{field_id}/{fieldset_id}/disassociate', ['uses' => 'CustomFieldsController@deleteFieldFromFieldset','as' => 'admin.custom_fields.disassociate']); Route::match(['DELETE'], 'custom_fields/delete-field/{id}', ['uses' => 'CustomFieldsController@deleteField','as' => 'admin.custom_fields.delete-field']); - Route::resource('custom_fields', 'CustomFieldsController'); + + Route::get('custom_fields', ['uses' =>'CustomFieldsController@index','as' => 'admin.custom_fields.index']); + # User Management Route::group([ 'prefix' => 'users', 'middleware' => ['web','auth','authorize:users.view']], function () { @@ -970,7 +972,7 @@ Route::group(['middleware' => ['web','auth','authorize:reports.view']], function 'reports/activity/json', [ 'as' => 'api.activity.list', 'uses' => 'ReportsController@getActivityReportDataTable' ] ); - + Route::get( 'reports/unaccepted_assets', [ 'as' => 'reports/unaccepted_assets', 'uses' => 'ReportsController@getAssetAcceptanceReport' ] @@ -1042,7 +1044,7 @@ Route::get( [ 'as' => 'two-factor-enroll', 'middleware' => ['web'], - 'uses' => 'Auth\AuthController@getTwoFactorEnroll' ] + 'uses' => 'Auth\LoginController@getTwoFactorEnroll' ] ); Route::get( @@ -1050,7 +1052,7 @@ Route::get( [ 'as' => 'two-factor', 'middleware' => ['web'], - 'uses' => 'Auth\AuthController@getTwoFactorAuth' ] + 'uses' => 'Auth\LoginController@getTwoFactorAuth' ] ); Route::post( @@ -1058,7 +1060,7 @@ Route::post( [ 'as' => 'two-factor', 'middleware' => ['web'], - 'uses' => 'Auth\AuthController@postTwoFactorAuth' ] + 'uses' => 'Auth\LoginController@postTwoFactorAuth' ] ); Route::get( @@ -1078,13 +1080,13 @@ Route::group(['middleware' => 'web'], function () { [ 'as' => 'login', 'middleware' => ['web'], - 'uses' => 'Auth\AuthController@showLoginForm' ] + 'uses' => 'Auth\LoginController@showLoginForm' ] ); Route::get( 'logout', [ 'as' => 'logout', - 'uses' => 'Auth\AuthController@logout' ] + 'uses' => 'Auth\LoginController@logout' ] ); });