Skip to content

Commit 4ed421a

Browse files
authored
Merge pull request #641 from hhaccessibility/group-routes
Group routes
2 parents 607c8cc + c686055 commit 4ed421a

5 files changed

Lines changed: 47 additions & 24 deletions

File tree

app/routes/auth.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
<?php
2-
Route::get('signin', 'SignInController@showForm');
3-
Route::post('signin', 'SignInController@authenticate');
4-
Route::get('signout', 'SignInController@signout');
52

6-
Route::get('fbauth/{auth?}', array('as'=>'facebookAuth', 'uses'=>'SocialAuthController@getFacebookLogin'));
3+
Route::group(['prefix' => 'signin'], function () {
4+
Route::get('/', 'SignInController@showForm');
5+
Route::post('/', 'SignInController@authenticate');
6+
});
7+
8+
Route::group(['prefix' => 'signup'], function () {
9+
Route::get('/', 'SignUpController@showForm');
10+
Route::post('/', 'SignUpController@createUser');
11+
Route::get('/confirmEmail/{user_email}/{email_verification_token}', 'SignUpController@confirmEmail');
12+
});
713

814
Route::get('socialauth/auth/{provider}', 'SocialAuthController@getSocialLogin');
915
Route::get('socialauth/auth', 'SocialAuthController@getSocialLoginCallBack');
1016

11-
Route::get('signup', 'SignUpController@showForm');
12-
Route::post('signup', 'SignUpController@createUser');
13-
Route::get('signup/confirmEmail/{user_email}/{email_verification_token}', 'SignUpController@confirmEmail');
17+
Route::get('fbauth/{auth?}', array('as'=>'facebookAuth', 'uses'=>'SocialAuthController@getFacebookLogin'));
18+
19+
Route::get('signout', 'SignInController@signout');

app/routes/contact.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
<?php
2-
Route::get('contact', 'ContactController@index');
3-
Route::post('contact', 'ContactController@sendMessage');
2+
3+
Route::group(['prefix' => 'contact'], function () {
4+
Route::get('/', 'ContactController@index');
5+
Route::post('/', 'ContactController@sendMessage');
6+
});

app/routes/password_recovery.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<?php
2-
Route::get('password-recovery', 'PasswordRecoveryController@form');
3-
Route::get('password-recovery/{user_email}/{password_recovery_token}', 'PasswordRecoveryController@passwordRecover');
4-
Route::post('password-recovery', 'PasswordRecoveryController@sendEmail');
5-
Route::post('password-recovery/reset-password', 'PasswordRecoveryController@resetPassword');
6-
Route::get('change-password', 'ChangePasswordController@index');
7-
Route::post('change-password', 'ChangePasswordController@post');
2+
Route::group(['prefix' => 'password-recovery'], function () {
3+
Route::get('/', 'PasswordRecoveryController@form');
4+
Route::post('/', 'PasswordRecoveryController@sendEmail');
5+
Route::get('/{user_email}/{password_recovery_token}', 'PasswordRecoveryController@passwordRecover');
6+
Route::post('/reset-password', 'PasswordRecoveryController@resetPassword');
7+
});
8+
Route::group(['prefix' => 'change-password'], function () {
9+
Route::get('/', 'ChangePasswordController@index');
10+
Route::post('/', 'ChangePasswordController@post');
11+
});

app/routes/profile.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
<?php
2-
Route::get('profile', 'ProfileController@index');
3-
Route::post('profile', 'ProfileController@save');
4-
Route::get('profile-photo-upload', 'ProfilePhotoUploadController@index');
5-
Route::post('profile-photo-upload', 'ProfilePhotoUploadController@post');
2+
3+
Route::group(['prefix' => 'profile'], function () {
4+
Route::get('/', 'ProfileController@index');
5+
Route::post('/', 'ProfileController@save');
6+
});
7+
Route::group(['prefix' => 'profile-photo-upload'], function () {
8+
Route::get('/', 'ProfilePhotoUploadController@index');
9+
Route::post('/', 'ProfilePhotoUploadController@post');
10+
});
11+
612
Route::get('profile-photo', 'ProfilePhotoUploadController@photo');
713
Route::post('profile-photo-rotate', 'ProfilePhotoUploadController@rotate');
814
Route::get('profile-photo-delete', 'ProfilePhotoUploadController@delete');

app/routes/ratings.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<?php
2-
Route::get('location-rating/{location_id}', 'LocationRatingController@show');
3-
Route::get('location-rating/{location_id}/{question_category_id}', 'LocationRatingController@show');
2+
3+
Route::group(['prefix' => 'location-rating'], function () {
4+
Route::get('/{location_id}', 'LocationRatingController@show');
5+
Route::get('/{location_id}/{question_category_id}', 'LocationRatingController@show');
6+
Route::put('/answer', 'LocationRatingController@setAnswer');
7+
Route::delete('/answer', 'LocationRatingController@removeAnswer');
8+
Route::put('/comment', 'LocationRatingController@setComment');
9+
});
10+
411
Route::post('location-rating-submit', 'LocationRatingController@submit');
5-
Route::put('location-rating/answer', 'LocationRatingController@setAnswer');
6-
Route::delete('location-rating/answer', 'LocationRatingController@removeAnswer');
7-
Route::put('location-rating/comment', 'LocationRatingController@setComment');
812
Route::post('location-rating-commit', 'LocationRatingController@commitReview');
913
Route::get('reviewed-locations', 'LocationRatingController@reviewedLocations');

0 commit comments

Comments
 (0)