@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function run() |
16 | 16 | { |
17 | - if (! config('adminetic.migrate_with_dummy', false)) { |
|
17 | + if (!config('adminetic.migrate_with_dummy', false)) { |
|
18 | 18 | Artisan::call('make:permission Role 2 --onlyFlags'); |
19 | 19 | Artisan::call('make:permission Permission 2 --onlyFlags'); |
20 | 20 | Artisan::call('make:permission User 2 --onlyFlags'); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function run() |
16 | 16 | { |
17 | - if (! config('adminetic.migrate_with_dummy', false)) { |
|
17 | + if (!config('adminetic.migrate_with_dummy', false)) { |
|
18 | 18 | $roles = [ |
19 | 19 | [ |
20 | 20 | 'name' => 'superadmin', |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function run() |
18 | 18 | { |
19 | - if (! config('adminetic.migrate_with_dummy', false)) { |
|
19 | + if (!config('adminetic.migrate_with_dummy', false)) { |
|
20 | 20 | $admin = User::create([ |
21 | 21 | 'name' => 'Admin User', |
22 | 22 | 'email' => '[email protected]', |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('role_user', function (Blueprint $table) { |
|
16 | + Schema::create('role_user', function(Blueprint $table) { |
|
17 | 17 | $table->bigIncrements('id'); |
18 | 18 | $table->unsignedBigInteger('role_id'); |
19 | 19 | $table->unsignedBigInteger('user_id'); |
@@ -26,9 +26,9 @@ |
||
26 | 26 | </thead> |
27 | 27 | <?php |
28 | 28 | |
29 | -if (! empty($_POST)) { |
|
29 | +if (!empty($_POST)) { |
|
30 | 30 | foreach ($_POST as $key => $value) { |
31 | - if ((! is_string($value) && ! is_numeric($value)) || ! is_string($key)) { |
|
31 | + if ((!is_string($value) && !is_numeric($value)) || !is_string($key)) { |
|
32 | 32 | continue; |
33 | 33 | } |
34 | 34 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * |
8 | 8 | *@return string |
9 | 9 | */ |
10 | -if (! function_exists('adminBaseUrl')) { |
|
10 | +if (!function_exists('adminBaseUrl')) { |
|
11 | 11 | function adminBaseUrl($route) |
12 | 12 | { |
13 | 13 | return url(config('admin.prefix', 'admin').'/'.$route); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * |
22 | 22 | *@return string |
23 | 23 | */ |
24 | -if (! function_exists('adminRedirectRoute')) { |
|
24 | +if (!function_exists('adminRedirectRoute')) { |
|
25 | 25 | function adminRedirectRoute($route) |
26 | 26 | { |
27 | 27 | return adminBaseUrl($route); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | *@return string |
37 | 37 | */ |
38 | -if (! function_exists('adminCreateRoute')) { |
|
38 | +if (!function_exists('adminCreateRoute')) { |
|
39 | 39 | function adminCreateRoute($route) |
40 | 40 | { |
41 | 41 | return adminBaseUrl($route).'/create'; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * |
51 | 51 | *@return return_type |
52 | 52 | */ |
53 | -if (! function_exists('adminShowRoute')) { |
|
53 | +if (!function_exists('adminShowRoute')) { |
|
54 | 54 | function adminShowRoute($route, $id) |
55 | 55 | { |
56 | 56 | return adminBaseUrl($route).'/'.$id; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * |
66 | 66 | *@return string |
67 | 67 | */ |
68 | -if (! function_exists('adminEditRoute')) { |
|
68 | +if (!function_exists('adminEditRoute')) { |
|
69 | 69 | function adminEditRoute($route, $id) |
70 | 70 | { |
71 | 71 | return adminBaseUrl($route).'/'.$id.'/edit'; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * |
80 | 80 | *@return string |
81 | 81 | */ |
82 | -if (! function_exists('adminStoreRoute')) { |
|
82 | +if (!function_exists('adminStoreRoute')) { |
|
83 | 83 | function adminStoreRoute($route) |
84 | 84 | { |
85 | 85 | return adminBaseUrl($route); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * |
95 | 95 | *@return string |
96 | 96 | */ |
97 | -if (! function_exists('adminUpdateRoute')) { |
|
97 | +if (!function_exists('adminUpdateRoute')) { |
|
98 | 98 | function adminUpdateRoute($route, $id) |
99 | 99 | { |
100 | 100 | return adminBaseUrl($route).'/'.$id; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * |
110 | 110 | *@return string |
111 | 111 | */ |
112 | -if (! function_exists('adminDeleteRoute')) { |
|
112 | +if (!function_exists('adminDeleteRoute')) { |
|
113 | 113 | function adminDeleteRoute($route, $id) |
114 | 114 | { |
115 | 115 | return adminBaseUrl($route).'/'.$id; |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | */ |
165 | 165 | protected function registerRoutes() |
166 | 166 | { |
167 | - Route::group($this->routeConfiguration(), function () { |
|
167 | + Route::group($this->routeConfiguration(), function() { |
|
168 | 168 | $this->loadRoutesFrom(__DIR__.'/../../routes/web.php'); |
169 | 169 | }); |
170 | 170 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | */ |
209 | 209 | protected function directives() |
210 | 210 | { |
211 | - Blade::if('hasRole', function ($roles) { |
|
211 | + Blade::if ('hasRole', function($roles) { |
|
212 | 212 | $hasAccess = false; |
213 | 213 | $roles_array = explode('|', $roles); |
214 | 214 | foreach ($roles_array as $role) { |
@@ -217,10 +217,10 @@ discard block |
||
217 | 217 | |
218 | 218 | return $hasAccess; |
219 | 219 | }); |
220 | - Blade::if('preference', function ($preference_name, $default_value) { |
|
220 | + Blade::if ('preference', function($preference_name, $default_value) { |
|
221 | 221 | return preference($preference_name, $default_value); |
222 | 222 | }); |
223 | - Blade::directive('setting', function ($setting_name) { |
|
223 | + Blade::directive('setting', function($setting_name) { |
|
224 | 224 | return "<?php echo setting($setting_name) ?>"; |
225 | 225 | }); |
226 | 226 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | public function indexPreference() |
16 | 16 | { |
17 | 17 | $preferences = config('coderz.caching', true) |
18 | - ? (Cache::has('preferences') ? Cache::get('preferences') : Cache::rememberForever('preferences', function () { |
|
18 | + ? (Cache::has('preferences') ? Cache::get('preferences') : Cache::rememberForever('preferences', function() { |
|
19 | 19 | return Preference::latest()->get(); |
20 | 20 | })) |
21 | 21 | : Preference::latest()->get(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $users = User::all(); |
40 | 40 | if (isset($users)) { |
41 | 41 | foreach ($users as $user) { |
42 | - if (! isset($preference->roles)) { |
|
42 | + if (!isset($preference->roles)) { |
|
43 | 43 | $preference->users()->attach($user->id, [ |
44 | 44 | 'enabled' => $preference->active, |
45 | 45 | ]); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public function indexSetting() |
16 | 16 | { |
17 | 17 | $settings = config('coderz.caching', true) |
18 | - ? (Cache::has('settings') ? Cache::get('settings') : Cache::rememberForever('settings', function () { |
|
18 | + ? (Cache::has('settings') ? Cache::get('settings') : Cache::rememberForever('settings', function() { |
|
19 | 19 | return Setting::latest()->get(); |
20 | 20 | })) |
21 | 21 | : Setting::latest()->get(); |