diff --git a/app/Http/Controllers/Api/V1/AuthController.php b/app/Http/Controllers/Api/V1/AuthController.php index c71f03b4abbe51cdc11a26809d4a7787e8aaf898..f4cff533f55517bc671fb19ba9eece407d2d9019 100644 --- a/app/Http/Controllers/Api/V1/AuthController.php +++ b/app/Http/Controllers/Api/V1/AuthController.php @@ -3,8 +3,8 @@ namespace App\Http\Controllers\Api\V1; use Illuminate\Http\Request; -use Validator; use Illuminate\Support\Facades\Auth; +use Validator; class AuthController extends APIController { @@ -30,8 +30,7 @@ class AuthController extends APIController try { - if(!Auth::attempt($credentials)) - { + if (!Auth::attempt($credentials)) { return $this->throwValidation(trans('api.messages.login.failed')); } @@ -72,9 +71,7 @@ class AuthController extends APIController public function logout(Request $request) { try { - $request->user()->token()->revoke(); - } catch (\Exception $e) { return $this->respondInternalError($e->getMessage()); } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index d589d0cb8b6a6e576025e89ea9f2e457c3227204..2945da5d1c67e181001d32e65dbcb431686ba352 100755 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -73,6 +73,6 @@ class Kernel extends HttpKernel * Access Middleware */ 'access.routeNeedsRole' => \App\Http\Middleware\RouteNeedsRole::class, - 'access.routeNeedsPermission' => \App\Http\Middleware\RouteNeedsPermission::class + 'access.routeNeedsPermission' => \App\Http\Middleware\RouteNeedsPermission::class, ]; } diff --git a/config/app.php b/config/app.php index 0ebab4eeca74ac32084e63f67af4576f4dbf308b..9e9d16c42251bed97cb79bd8a43b71143d6213cf 100755 --- a/config/app.php +++ b/config/app.php @@ -199,7 +199,7 @@ return [ App\Providers\HistoryServiceProvider::class, App\Providers\RouteServiceProvider::class, Bvipul\Generator\Provider\CrudGeneratorServiceProvider::class, - Laravel\Passport\PassportServiceProvider::class + Laravel\Passport\PassportServiceProvider::class, ], /*