Passed
Push — main ( 39ac5b...9806af )
by Julian
09:30
created
app/Http/Controllers/Auth/ConfirmablePasswordController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function store(Request $request)
31 31
     {
32
-        if (! Auth::guard('web')->validate([
32
+        if (!Auth::guard('web')->validate([
33 33
             'email' => $request->user()->email,
34 34
             'password' => $request->password,
35 35
         ])) {
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/NewPasswordController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         // database. Otherwise we will parse the error and return the response.
43 43
         $status = Password::reset(
44 44
             $request->only('email', 'password', 'password_confirmation', 'token'),
45
-            function ($user) use ($request) {
45
+            function($user) use ($request) {
46 46
                 $user->forceFill([
47 47
                     'password' => Hash::make($request->password),
48 48
                     'remember_token' => Str::random(60),
Please login to merge, or discard this patch.
app/Http/Controllers/InstallerController.php 2 patches
Braces   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     {
41 41
         if($request->database == 'MySQL'){
42 42
             return redirect(url('?mysql'));
43
-        }else{
43
+        } else{
44 44
             return redirect(url('?4'));
45 45
         }
46 46
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             fclose($handleFile);
60 60
         }
61 61
 
62
-        try{EnvEditor::addKey('ADMIN_EMAIL', $email);}catch(Exception $e){}
62
+        try{EnvEditor::addKey('ADMIN_EMAIL', $email);} catch(Exception $e){}
63 63
 
64 64
         if(DB::table('users')->count() == '0'){
65 65
         Schema::disableForeignKeyConstraints();
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
         $DB_USERNAME = $request->username;
93 93
         $DB_PASSWORD = $request->password;
94 94
 
95
-        if(EnvEditor::keyExists('DB_CONNECTION')){EnvEditor::editKey('DB_CONNECTION', $DB_CONNECTION);}else{EnvEditor::addKey('DB_CONNECTION', $DB_CONNECTION);}
96
-        if(EnvEditor::keyExists('DB_HOST')){EnvEditor::editKey('DB_HOST', $DB_HOST);}else{EnvEditor::addKey('DB_HOST', $DB_HOST);}
97
-        if(EnvEditor::keyExists('DB_PORT')){EnvEditor::editKey('DB_PORT', $DB_PORT);}else{EnvEditor::addKey('DB_PORT', $DB_PORT);}
98
-        if(EnvEditor::keyExists('DB_DATABASE')){EnvEditor::editKey('DB_DATABASE', $DB_DATABASE);}else{EnvEditor::addKey('DB_DATABASE', $DB_DATABASE);}
99
-        if(EnvEditor::keyExists('DB_USERNAME')){EnvEditor::editKey('DB_USERNAME', $DB_USERNAME);}else{EnvEditor::addKey('DB_USERNAME', $DB_USERNAME);}
100
-        if(EnvEditor::keyExists('DB_PASSWORD')){EnvEditor::editKey('DB_PASSWORD', $DB_PASSWORD);}else{EnvEditor::addKey('DB_PASSWORD', $DB_PASSWORD);}
95
+        if(EnvEditor::keyExists('DB_CONNECTION')){EnvEditor::editKey('DB_CONNECTION', $DB_CONNECTION);} else{EnvEditor::addKey('DB_CONNECTION', $DB_CONNECTION);}
96
+        if(EnvEditor::keyExists('DB_HOST')){EnvEditor::editKey('DB_HOST', $DB_HOST);} else{EnvEditor::addKey('DB_HOST', $DB_HOST);}
97
+        if(EnvEditor::keyExists('DB_PORT')){EnvEditor::editKey('DB_PORT', $DB_PORT);} else{EnvEditor::addKey('DB_PORT', $DB_PORT);}
98
+        if(EnvEditor::keyExists('DB_DATABASE')){EnvEditor::editKey('DB_DATABASE', $DB_DATABASE);} else{EnvEditor::addKey('DB_DATABASE', $DB_DATABASE);}
99
+        if(EnvEditor::keyExists('DB_USERNAME')){EnvEditor::editKey('DB_USERNAME', $DB_USERNAME);} else{EnvEditor::addKey('DB_USERNAME', $DB_USERNAME);}
100
+        if(EnvEditor::keyExists('DB_PASSWORD')){EnvEditor::editKey('DB_PASSWORD', $DB_PASSWORD);} else{EnvEditor::addKey('DB_PASSWORD', $DB_PASSWORD);}
101 101
 
102 102
         return redirect(url('mysql-test'));
103 103
 
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
         try {$users = DB::table('buttons')->count(); $failed = false;} catch (exception $e) {$failed = true;}
114 114
 
115 115
         if($failed == true){
116
-            if(EnvEditor::keyExists('DB_CONNECTION')){EnvEditor::editKey('DB_CONNECTION', 'sqlite');}else{EnvEditor::addKey('DB_CONNECTION', 'sqlite');}
116
+            if(EnvEditor::keyExists('DB_CONNECTION')){EnvEditor::editKey('DB_CONNECTION', 'sqlite');} else{EnvEditor::addKey('DB_CONNECTION', 'sqlite');}
117 117
             if(EnvEditor::keyExists('DB_HOST')){EnvEditor::deleteKey('DB_HOST');}
118 118
             if(EnvEditor::keyExists('DB_PORT')){EnvEditor::deleteKey('DB_PORT');}
119 119
             if(EnvEditor::keyExists('DB_DATABASE')){EnvEditor::deleteKey('DB_DATABASE');}
120 120
             if(EnvEditor::keyExists('DB_USERNAME')){EnvEditor::deleteKey('DB_USERNAME');}
121 121
             if(EnvEditor::keyExists('DB_PASSWORD')){EnvEditor::deleteKey('DB_PASSWORD');}
122 122
             return redirect(url('?error'));
123
-        }else{
123
+        } else{
124 124
             return redirect(url('?4'));
125 125
         }
126 126
     }
@@ -132,15 +132,15 @@  discard block
 block discarded – undo
132 132
         $llName = $user->littlelink_name;
133 133
 
134 134
         if($request->register == 'Yes'){ 
135
-            if(EnvEditor::keyExists('ALLOW_REGISTRATION')){EnvEditor::editKey('ALLOW_REGISTRATION', 'true');}else{EnvEditor::addKey('ALLOW_REGISTRATION', 'true');}
135
+            if(EnvEditor::keyExists('ALLOW_REGISTRATION')){EnvEditor::editKey('ALLOW_REGISTRATION', 'true');} else{EnvEditor::addKey('ALLOW_REGISTRATION', 'true');}
136 136
         } else {
137
-            if(EnvEditor::keyExists('ALLOW_REGISTRATION')){EnvEditor::editKey('ALLOW_REGISTRATION', 'false');}else{EnvEditor::addKey('ALLOW_REGISTRATION', 'false');}
137
+            if(EnvEditor::keyExists('ALLOW_REGISTRATION')){EnvEditor::editKey('ALLOW_REGISTRATION', 'false');} else{EnvEditor::addKey('ALLOW_REGISTRATION', 'false');}
138 138
         }
139 139
 
140
-        if($request->verify == 'Yes'){$value = "verified";}else{$value = "auth";}
140
+        if($request->verify == 'Yes'){$value = "verified";} else{$value = "auth";}
141 141
         if(EnvEditor::keyExists('REGISTER_AUTH')){EnvEditor::editKey('REGISTER_AUTH', $value);}
142 142
 
143
-        if($request->page == 'No'){$value = "";}else{$value = '"' . $llName . '"';}
143
+        if($request->page == 'No'){$value = "";} else{$value = '"' . $llName . '"';}
144 144
         if(EnvEditor::keyExists('HOME_URL')){EnvEditor::editKey('HOME_URL', $value);}
145 145
 
146 146
         if(EnvEditor::keyExists('APP_NAME')){EnvEditor::editKey('APP_NAME', '"' . $request->app . '"');}
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 
39 39
     public function db(request $request)
40 40
     {
41
-        if($request->database == 'MySQL'){
41
+        if ($request->database == 'MySQL') {
42 42
             return redirect(url('?mysql'));
43
-        }else{
43
+        } else {
44 44
             return redirect(url('?4'));
45 45
         }
46 46
     }
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
 
56 56
         $file = base_path('INSTALLERLOCK');
57 57
         if (!file_exists($file)) {
58
-            $handleFile = fopen($file, 'w') or die('Cannot create file:  '.$file);
58
+            $handleFile = fopen($file, 'w') or die('Cannot create file:  ' . $file);
59 59
             fclose($handleFile);
60 60
         }
61 61
 
62
-        try{EnvEditor::addKey('ADMIN_EMAIL', $email);}catch(Exception $e){}
62
+        try {EnvEditor::addKey('ADMIN_EMAIL', $email); } catch (Exception $e) {}
63 63
 
64
-        if(DB::table('users')->count() == '0'){
64
+        if (DB::table('users')->count() == '0') {
65 65
         Schema::disableForeignKeyConstraints();
66 66
         DB::table('users')->delete();
67 67
         DB::table('users')->truncate();
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
         $DB_USERNAME = $request->username;
93 93
         $DB_PASSWORD = $request->password;
94 94
 
95
-        if(EnvEditor::keyExists('DB_CONNECTION')){EnvEditor::editKey('DB_CONNECTION', $DB_CONNECTION);}else{EnvEditor::addKey('DB_CONNECTION', $DB_CONNECTION);}
96
-        if(EnvEditor::keyExists('DB_HOST')){EnvEditor::editKey('DB_HOST', $DB_HOST);}else{EnvEditor::addKey('DB_HOST', $DB_HOST);}
97
-        if(EnvEditor::keyExists('DB_PORT')){EnvEditor::editKey('DB_PORT', $DB_PORT);}else{EnvEditor::addKey('DB_PORT', $DB_PORT);}
98
-        if(EnvEditor::keyExists('DB_DATABASE')){EnvEditor::editKey('DB_DATABASE', $DB_DATABASE);}else{EnvEditor::addKey('DB_DATABASE', $DB_DATABASE);}
99
-        if(EnvEditor::keyExists('DB_USERNAME')){EnvEditor::editKey('DB_USERNAME', $DB_USERNAME);}else{EnvEditor::addKey('DB_USERNAME', $DB_USERNAME);}
100
-        if(EnvEditor::keyExists('DB_PASSWORD')){EnvEditor::editKey('DB_PASSWORD', $DB_PASSWORD);}else{EnvEditor::addKey('DB_PASSWORD', $DB_PASSWORD);}
95
+        if (EnvEditor::keyExists('DB_CONNECTION')) {EnvEditor::editKey('DB_CONNECTION', $DB_CONNECTION); } else {EnvEditor::addKey('DB_CONNECTION', $DB_CONNECTION); }
96
+        if (EnvEditor::keyExists('DB_HOST')) {EnvEditor::editKey('DB_HOST', $DB_HOST); } else {EnvEditor::addKey('DB_HOST', $DB_HOST); }
97
+        if (EnvEditor::keyExists('DB_PORT')) {EnvEditor::editKey('DB_PORT', $DB_PORT); } else {EnvEditor::addKey('DB_PORT', $DB_PORT); }
98
+        if (EnvEditor::keyExists('DB_DATABASE')) {EnvEditor::editKey('DB_DATABASE', $DB_DATABASE); } else {EnvEditor::addKey('DB_DATABASE', $DB_DATABASE); }
99
+        if (EnvEditor::keyExists('DB_USERNAME')) {EnvEditor::editKey('DB_USERNAME', $DB_USERNAME); } else {EnvEditor::addKey('DB_USERNAME', $DB_USERNAME); }
100
+        if (EnvEditor::keyExists('DB_PASSWORD')) {EnvEditor::editKey('DB_PASSWORD', $DB_PASSWORD); } else {EnvEditor::addKey('DB_PASSWORD', $DB_PASSWORD); }
101 101
 
102 102
         return redirect(url('mysql-test'));
103 103
 
@@ -105,22 +105,22 @@  discard block
 block discarded – undo
105 105
 
106 106
     public function mysqlTest(request $request)
107 107
     {
108
-        try {Artisan::call('migrate');} catch (exception $e) {$failed = "true";}
109
-        try {Artisan::call('db:seed --force');} catch (exception $e) {$failed = "true";}
110
-        try {Artisan::call('db:seed --class="PageSeeder" --force');} catch (exception $e) {$failed = "true";}
111
-        try {Artisan::call('db:seed --class="ButtonSeeder" --force');} catch (exception $e) {$failed = "true";}
112
-
113
-        try {$users = DB::table('buttons')->count(); $failed = false;} catch (exception $e) {$failed = true;}
114
-
115
-        if($failed == true){
116
-            if(EnvEditor::keyExists('DB_CONNECTION')){EnvEditor::editKey('DB_CONNECTION', 'sqlite');}else{EnvEditor::addKey('DB_CONNECTION', 'sqlite');}
117
-            if(EnvEditor::keyExists('DB_HOST')){EnvEditor::deleteKey('DB_HOST');}
118
-            if(EnvEditor::keyExists('DB_PORT')){EnvEditor::deleteKey('DB_PORT');}
119
-            if(EnvEditor::keyExists('DB_DATABASE')){EnvEditor::deleteKey('DB_DATABASE');}
120
-            if(EnvEditor::keyExists('DB_USERNAME')){EnvEditor::deleteKey('DB_USERNAME');}
121
-            if(EnvEditor::keyExists('DB_PASSWORD')){EnvEditor::deleteKey('DB_PASSWORD');}
108
+        try {Artisan::call('migrate'); } catch (exception $e) {$failed = "true"; }
109
+        try {Artisan::call('db:seed --force'); } catch (exception $e) {$failed = "true"; }
110
+        try {Artisan::call('db:seed --class="PageSeeder" --force'); } catch (exception $e) {$failed = "true"; }
111
+        try {Artisan::call('db:seed --class="ButtonSeeder" --force'); } catch (exception $e) {$failed = "true"; }
112
+
113
+        try {$users = DB::table('buttons')->count(); $failed = false; } catch (exception $e) {$failed = true; }
114
+
115
+        if ($failed == true) {
116
+            if (EnvEditor::keyExists('DB_CONNECTION')) {EnvEditor::editKey('DB_CONNECTION', 'sqlite'); } else {EnvEditor::addKey('DB_CONNECTION', 'sqlite'); }
117
+            if (EnvEditor::keyExists('DB_HOST')) {EnvEditor::deleteKey('DB_HOST'); }
118
+            if (EnvEditor::keyExists('DB_PORT')) {EnvEditor::deleteKey('DB_PORT'); }
119
+            if (EnvEditor::keyExists('DB_DATABASE')) {EnvEditor::deleteKey('DB_DATABASE'); }
120
+            if (EnvEditor::keyExists('DB_USERNAME')) {EnvEditor::deleteKey('DB_USERNAME'); }
121
+            if (EnvEditor::keyExists('DB_PASSWORD')) {EnvEditor::deleteKey('DB_PASSWORD'); }
122 122
             return redirect(url('?error'));
123
-        }else{
123
+        } else {
124 124
             return redirect(url('?4'));
125 125
         }
126 126
     }
@@ -131,25 +131,25 @@  discard block
 block discarded – undo
131 131
         $user = User::find(1);
132 132
         $llName = $user->littlelink_name;
133 133
 
134
-        if($request->register == 'Yes'){ 
135
-            if(EnvEditor::keyExists('ALLOW_REGISTRATION')){EnvEditor::editKey('ALLOW_REGISTRATION', 'true');}else{EnvEditor::addKey('ALLOW_REGISTRATION', 'true');}
134
+        if ($request->register == 'Yes') { 
135
+            if (EnvEditor::keyExists('ALLOW_REGISTRATION')) {EnvEditor::editKey('ALLOW_REGISTRATION', 'true'); } else {EnvEditor::addKey('ALLOW_REGISTRATION', 'true'); }
136 136
         } else {
137
-            if(EnvEditor::keyExists('ALLOW_REGISTRATION')){EnvEditor::editKey('ALLOW_REGISTRATION', 'false');}else{EnvEditor::addKey('ALLOW_REGISTRATION', 'false');}
137
+            if (EnvEditor::keyExists('ALLOW_REGISTRATION')) {EnvEditor::editKey('ALLOW_REGISTRATION', 'false'); } else {EnvEditor::addKey('ALLOW_REGISTRATION', 'false'); }
138 138
         }
139 139
 
140
-        if($request->verify == 'Yes'){$value = "verified";}else{$value = "auth";}
141
-        if(EnvEditor::keyExists('REGISTER_AUTH')){EnvEditor::editKey('REGISTER_AUTH', $value);}
140
+        if ($request->verify == 'Yes') {$value = "verified"; } else {$value = "auth"; }
141
+        if (EnvEditor::keyExists('REGISTER_AUTH')) {EnvEditor::editKey('REGISTER_AUTH', $value); }
142 142
 
143
-        if($request->page == 'No'){$value = "";}else{$value = '"' . $llName . '"';}
144
-        if(EnvEditor::keyExists('HOME_URL')){EnvEditor::editKey('HOME_URL', $value);}
143
+        if ($request->page == 'No') {$value = ""; } else {$value = '"' . $llName . '"'; }
144
+        if (EnvEditor::keyExists('HOME_URL')) {EnvEditor::editKey('HOME_URL', $value); }
145 145
 
146
-        if(EnvEditor::keyExists('APP_NAME')){EnvEditor::editKey('APP_NAME', '"' . $request->app . '"');}
146
+        if (EnvEditor::keyExists('APP_NAME')) {EnvEditor::editKey('APP_NAME', '"' . $request->app . '"'); }
147 147
 
148
-        if(file_exists(base_path("INSTALLING"))){unlink(base_path("INSTALLING"));}
148
+        if (file_exists(base_path("INSTALLING"))) {unlink(base_path("INSTALLING")); }
149 149
 
150 150
         $file = base_path('INSTALLERLOCK');
151 151
         if (file_exists($file)) {
152
-            unlink($file) or die('Cannot delete file: '.$file);
152
+            unlink($file) or die('Cannot delete file: ' . $file);
153 153
             sleep(1);
154 154
         }
155 155
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         $value = $request->value;
165 165
         $value = '"' . $request->value . '"';
166 166
         
167
-        if(EnvEditor::keyExists($entry)){EnvEditor::editKey($entry, $value);}
167
+        if (EnvEditor::keyExists($entry)) {EnvEditor::editKey($entry, $value); }
168 168
 
169 169
         return Redirect(url('dashboard'));
170 170
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/LinkTypeController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 
50 50
         // store
51 51
         $LinkType = new LinkType;
52
-        $LinkType->typename       = $request->typename;
53
-        $LinkType->title      = $request->title;
52
+        $LinkType->typename = $request->typename;
53
+        $LinkType->title = $request->title;
54 54
         $LinkType->description = $request->description;
55
-        $LinkType->icon            = $request->icon;
55
+        $LinkType->icon = $request->icon;
56 56
         $LinkType->params = $request->params;
57 57
         $LinkType->save();
58 58
 
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
 
101 101
 
102 102
         // store
103
-        $linktype->title      = $request->title;
103
+        $linktype->title = $request->title;
104 104
         $linktype->description = $request->description;
105
-        $linktype->icon            = $request->icon;
105
+        $linktype->icon = $request->icon;
106 106
         $linktype->params = $request->params;
107 107
         $linktype->save();
108 108
 
Please login to merge, or discard this patch.
app/Http/Kernel.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
66 66
         'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
67 67
         'link-id' => \App\Http\Middleware\LinkId::class,
68
-	    'admin' => \App\Http\Middleware\admin::class,
68
+        'admin' => \App\Http\Middleware\admin::class,
69 69
         'blocked' => \App\Http\Middleware\CheckBlockedUser::class,
70 70
         'max.users' => \App\Http\Middleware\MaxUsers::class,
71 71
         'impersonate' => \App\Http\Middleware\Impersonate::class,
Please login to merge, or discard this patch.
app/Http/Requests/Auth/LoginRequest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $this->ensureIsNotRateLimited();
47 47
 
48
-        if (! Auth::attempt(['email' => $this->email, 'password' => $this->password, 'block' => 'no'] , $this->filled('remember'))) {
48
+        if (!Auth::attempt(['email' => $this->email, 'password' => $this->password, 'block' => 'no'], $this->filled('remember'))) {
49 49
             RateLimiter::hit($this->throttleKey());
50 50
 
51 51
             throw ValidationException::withMessages([
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function ensureIsNotRateLimited()
67 67
     {
68
-        if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
68
+        if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
69 69
             return;
70 70
         }
71 71
 
@@ -88,6 +88,6 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function throttleKey()
90 90
     {
91
-        return Str::lower($this->input('email')).'|'.$this->ip();
91
+        return Str::lower($this->input('email')) . '|' . $this->ip();
92 92
     }
93 93
 }
Please login to merge, or discard this patch.
app/Http/Middleware/Authenticate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     protected function redirectTo($request)
16 16
     {
17
-        if (! $request->expectsJson()) {
17
+        if (!$request->expectsJson()) {
18 18
             return route('login');
19 19
         }
20 20
     }
Please login to merge, or discard this patch.
app/Http/Middleware/Impersonate.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 {
13 13
     public function handle($request, Closure $next)
14 14
     {
15
-      if(Schema::hasColumn('users', 'auth_as')) {
15
+        if(Schema::hasColumn('users', 'auth_as')) {
16 16
         $adminUser = User::where('role', 'admin')->where(function ($query) {
17 17
             $query->where('auth_as', '!=', null)
18 18
                 ->where('auth_as', '!=', '');
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
             return $next($request);
160 160
         }
161 161
 
162
-      } else {
162
+        } else {
163 163
         return $next($request);
164
-      }
164
+        }
165 165
 
166 166
     }
167 167
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
 {
13 13
     public function handle($request, Closure $next)
14 14
     {
15
-      if(Schema::hasColumn('users', 'auth_as')) {
16
-        $adminUser = User::where('role', 'admin')->where(function ($query) {
15
+      if (Schema::hasColumn('users', 'auth_as')) {
16
+        $adminUser = User::where('role', 'admin')->where(function($query) {
17 17
             $query->where('auth_as', '!=', null)
18 18
                 ->where('auth_as', '!=', '');
19 19
         })->first();
Please login to merge, or discard this patch.
app/Http/Middleware/admin.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
     public function handle(Request $request, Closure $next)
19 19
     {
20 20
 
21
-      //check is admin
22
-      if (Auth::user() && Auth::user()->role == 'admin') {
21
+        //check is admin
22
+        if (Auth::user() && Auth::user()->role == 'admin') {
23 23
             return $next($request);
24
-      }   
24
+        }   
25 25
 
26 26
             return redirect(url('dashboard'));
27 27
     }
Please login to merge, or discard this patch.