From d6df567e05261a1c71f127aa0c6ac6d07c3c9cef Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 6 Jul 2018 23:26:58 +0200 Subject: Cleaned up main routes --- routes/web.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'routes') diff --git a/routes/web.php b/routes/web.php index 8fb9090..851834e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -9,16 +9,13 @@ | contains the "web" middleware group. Now create something great! | */ -Route::get('/', function () { - return view('welcome'); -}); - Auth::routes(); -Route::middleware('auth', 'throttle:30,1')->group(function () { - Route::get('profile', 'UserController@Profile'); - Route::get('avatar/{user_id}', 'ImageController@getAvatar'); - Route::get('/', ['as' => 'writeMessage', 'uses' => 'SocketController@writeMessage']); +Route::middleware('auth', 'throttle:30') // throttle to 30 per minute + ->group(function () { + Route::get('profile', 'UserController@Profile'); + Route::get('avatar/{user_id}', 'ImageController@getAvatar'); + Route::get('/', ['as' => 'writeMessage', 'uses' => 'SocketController@writeMessage']); - Route::post('avatar', 'UserController@updateAvatar'); - Route::post('sendMessage', 'SocketController@sendMessage'); -}); + Route::post('avatar', 'UserController@updateAvatar'); + Route::post('sendMessage', 'SocketController@sendMessage'); + }); -- cgit v1.2.3