group(function () { Route::get('/', ['as' => 'writeMessage', 'uses' => 'SocketController@writeMessage']); Route::get('avatar/{user_id}', 'ImageController@getAvatar'); Route::get('profile', 'UserController@Profile'); Route::get('keys/cookie/public/', 'PublicKeyController@setUsersKeyByCookie'); // actually it's a post but it has to be get (via cookie) => TODO: Route::get('keys/public/{user_id}', 'PublicKeyController@getUsersKey'); Route::post('avatar', 'UserController@updateAvatar'); Route::post('keys/public', 'PublicKeyController@setUsersKey'); Route::post('sendMessage', 'SocketController@sendMessage'); });