@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | $api = app('Dingo\Api\Routing\Router'); |
4 | 4 | |
5 | -$api->version('v1', function ($api) { |
|
5 | +$api->version('v1', function($api) { |
|
6 | 6 | $api->post('auth/login', 'Autumn\JWTAuth\Http\Controllers\AuthController@authenticate'); |
7 | 7 | $api->post('auth/register', 'Autumn\JWTAuth\Http\Controllers\AuthController@register'); |
8 | 8 | $api->post('auth/logout', 'Autumn\JWTAuth\Http\Controllers\AuthController@logout'); |
@@ -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 | 'error' => 'invalid_credentials', |
27 | 27 | ], 401); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $data = $request->all(); |
41 | 41 | |
42 | - if (! array_key_exists('password_confirmation', $request->all())) { |
|
42 | + if (!array_key_exists('password_confirmation', $request->all())) { |
|
43 | 43 | $data['password_confirmation'] = $request->get('password'); |
44 | 44 | } |
45 | 45 |
@@ -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; |