@@ -46,7 +46,7 @@ |
||
| 46 | 46 | */ |
| 47 | 47 | public function byId($id) |
| 48 | 48 | { |
| 49 | - if (! is_null($user = $this->auth->findUserById($id))) { |
|
| 49 | + if (!is_null($user = $this->auth->findUserById($id))) { |
|
| 50 | 50 | $this->auth->setUser($user); |
| 51 | 51 | |
| 52 | 52 | return true; |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | public function authenticate(Request $request) |
| 22 | 22 | { |
| 23 | 23 | try { |
| 24 | - if (! $token = $this->auth->attempt($request->only('email', 'password'))) { |
|
| 24 | + if (!$token = $this->auth->attempt($request->only('email', 'password'))) { |
|
| 25 | 25 | return response()->json([ |
| 26 | 26 | 'errors' => [ |
| 27 | 27 | 'root' => 'Could not sign you in with those details.', |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | { |
| 49 | 49 | $data = $request->all(); |
| 50 | 50 | |
| 51 | - if (! array_key_exists('password_confirmation', $request->all())) { |
|
| 51 | + if (!array_key_exists('password_confirmation', $request->all())) { |
|
| 52 | 52 | $data['password_confirmation'] = $request->get('password'); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -Route::group(['prefix' => 'api'], function () { |
|
| 3 | +Route::group(['prefix' => 'api'], function() { |
|
| 4 | 4 | Route::post('auth/login', 'Autumn\JWTAuth\Http\Controllers\AuthController@authenticate'); |
| 5 | 5 | Route::post('auth/register', 'Autumn\JWTAuth\Http\Controllers\AuthController@register'); |
| 6 | 6 | Route::post('auth/logout', 'Autumn\JWTAuth\Http\Controllers\AuthController@logout'); |
| 7 | 7 | |
| 8 | - Route::group(['middleware' => 'jwt.auth'], function () { |
|
| 8 | + Route::group(['middleware' => 'jwt.auth'], function() { |
|
| 9 | 9 | Route::get('auth/me', 'Autumn\JWTAuth\Http\Controllers\AuthController@user'); |
| 10 | 10 | }); |
| 11 | 11 | }); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | protected function registerJWTCommand() |
| 52 | 52 | { |
| 53 | - $this->app->singleton('tymon.jwt.generate', function () { |
|
| 53 | + $this->app->singleton('tymon.jwt.generate', function() { |
|
| 54 | 54 | return new JWTGenerateCommand(); |
| 55 | 55 | }); |
| 56 | 56 | } |
@@ -62,8 +62,8 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | protected function registerRequestRebindHandler() |
| 64 | 64 | { |
| 65 | - $this->app->rebinding('request', function ($app, $request) { |
|
| 66 | - $request->setUserResolver(function () use ($app) { |
|
| 65 | + $this->app->rebinding('request', function($app, $request) { |
|
| 66 | + $request->setUserResolver(function() use ($app) { |
|
| 67 | 67 | return $app['user.auth']->getUser(); |
| 68 | 68 | }); |
| 69 | 69 | }); |