Skip to content

Instantly share code, notes, and snippets.

@sadam1807
Created June 30, 2019 05:48
Show Gist options
  • Save sadam1807/43a19f1cf372841fac91f85e07334302 to your computer and use it in GitHub Desktop.
Save sadam1807/43a19f1cf372841fac91f85e07334302 to your computer and use it in GitHub Desktop.
<?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([ 'prefix' => 'auth'], function (){
Route::group(['middleware' => ['guest:api']], function () {
Route::post('login', 'API\AuthController@login');
Route::post('signup', 'API\AuthController@signup');
});
Route::group(['middleware' => 'auth:api'], function() {
Route::get('logout', 'API\AuthController@logout');
Route::get('getuser', 'API\AuthController@getUser');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment