mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 12:34:13 +00:00
8da0cbceec
added user to return role
36 lines
1.3 KiB
PHP
36 lines
1.3 KiB
PHP
<?php
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| API Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register API routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
| is assigned the "api" middleware group. Enjoy building your API!
|
|
|
|
|
*/
|
|
|
|
Route::group(['middleware' => 'auth:api'], function () {
|
|
Route::post('logout', 'Auth\LoginController@logout');
|
|
|
|
Route::get('/user', function (Request $request) {
|
|
return $request->user();
|
|
});
|
|
|
|
Route::patch('settings/profile', 'Settings\ProfileController@update');
|
|
Route::patch('settings/password', 'Settings\PasswordController@update');
|
|
});
|
|
|
|
Route::group(['middleware' => 'guest:api'], function () {
|
|
Route::post('login', 'Auth\LoginController@login');
|
|
Route::post('register', 'Auth\RegisterController@register');
|
|
Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail');
|
|
Route::post('password/reset', 'Auth\ResetPasswordController@reset');
|
|
|
|
Route::post('oauth/{driver}', 'Auth\OAuthController@redirectToProvider');
|
|
Route::get('oauth/{driver}/callback', 'Auth\OAuthController@handleProviderCallback')->name('oauth.callback');
|
|
});
|