Completed
Push — master ( 856338...f2b942 )
by Pásztor
05:13
created
http/controllers/AuthController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
routes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
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
 });
Please login to merge, or discard this patch.