aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/web.php
blob: 41725f279957d8c00d1434e52025f2be7a07d26a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
 */

// Route should not use authentication!
Route::get('verify/email/{token}', 'Auth\RegisterController@verifyEmail');

Auth::routes();
Route::middleware('auth', 'throttle:30') // throttle to 30 per minute
    ->group(function () {
        Route::get('/', ['as' => 'MessageChat', 'uses' => 'SocketController@writeMessage']);
        Route::get('avatar/{user_id}', ['as' => 'GetAvatar', 'uses' => 'ImageController@getAvatar']);
        Route::get('profile', ['as' => 'GetProfileSettings', 'uses' => 'UserController@Profile']);
        Route::get('admin', ['as' => 'GetAdminDashboard', 'uses' => 'AdminController@Dashboard']);

        Route::post('avatar', ['as' => 'UpdateAvatar', 'uses' => 'UserController@updateAvatar']);
        Route::post('sendMessage', ['as' => 'SendMessage', 'uses' => 'SocketController@sendMessage']);
    });