@@ -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 | ]); |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | public function userIndex() |
| 19 | 19 | { |
| 20 | 20 | $users = config('coderz.caching', true) |
| 21 | - ? (Cache::has('users') ? Cache::get('users') : Cache::rememberForever('users', function () { |
|
| 21 | + ? (Cache::has('users') ? Cache::get('users') : Cache::rememberForever('users', function() { |
|
| 22 | 22 | return User::with('roles', 'profile')->get(); |
| 23 | 23 | })) |
| 24 | 24 | : User::with('roles', 'profile')->get(); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $preferences = Preference::all(); |
| 132 | 132 | if (isset($preferences)) { |
| 133 | 133 | foreach ($preferences as $preference) { |
| 134 | - if (! isset($preference->roles)) { |
|
| 134 | + if (!isset($preference->roles)) { |
|
| 135 | 135 | $user->preferences()->attach($preference->id, [ |
| 136 | 136 | 'enabled' => $preference->active, |
| 137 | 137 | ]); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | $user = User::where('email', $socialiteuser->email)->first(); |
| 51 | 51 | |
| 52 | - if (! isset($user)) { |
|
| 52 | + if (!isset($user)) { |
|
| 53 | 53 | $user = User::create([ |
| 54 | 54 | 'name' => $socialiteuser->name, |
| 55 | 55 | 'email' => $socialiteuser->email, |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $preferences = Preference::all(); |
| 80 | 80 | if (isset($preferences)) { |
| 81 | 81 | foreach ($preferences as $preference) { |
| 82 | - if (! isset($preference->roles)) { |
|
| 82 | + if (!isset($preference->roles)) { |
|
| 83 | 83 | $user->preferences()->attach($preference->id, [ |
| 84 | 84 | 'enabled' => $preference->active, |
| 85 | 85 | ]); |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | $preferences = Preference::all(); |
| 91 | 91 | if (isset($preferences)) { |
| 92 | 92 | foreach ($preferences as $preference) { |
| 93 | - if (! isset($preference->roles)) { |
|
| 93 | + if (!isset($preference->roles)) { |
|
| 94 | 94 | $user->preferences()->attach($preference->id, [ |
| 95 | 95 | 'enabled' => $preference->active, |
| 96 | 96 | ]); |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function handle() |
| 44 | 44 | { |
| 45 | - if (! config('adminetic.migrate_with_dummy', false)) { |
|
| 45 | + if (!config('adminetic.migrate_with_dummy', false)) { |
|
| 46 | 46 | // Generating Roles |
| 47 | 47 | $roles = [ |
| 48 | 48 | [ |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | // Make Controller |
| 20 | 20 | protected static function makeController($name, $console) |
| 21 | 21 | { |
| 22 | - if (! file_exists($path = app_path('/Http/Controllers/Admin'))) { |
|
| 22 | + if (!file_exists($path = app_path('/Http/Controllers/Admin'))) { |
|
| 23 | 23 | mkdir($path, 0777, true); |
| 24 | 24 | } |
| 25 | 25 | $controllerTemplate = str_replace( |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | // Make Model |
| 44 | 44 | protected static function makeModel($name, $console) |
| 45 | 45 | { |
| 46 | - if (! file_exists($path = app_path('/Models/Admin'))) { |
|
| 46 | + if (!file_exists($path = app_path('/Models/Admin'))) { |
|
| 47 | 47 | mkdir($path, 0777, true); |
| 48 | 48 | } |
| 49 | 49 | $modelTemplate = str_replace( |
@@ -68,11 +68,11 @@ discard block |
||
| 68 | 68 | protected static function makeViews($name, $console) |
| 69 | 69 | { |
| 70 | 70 | $lowername = strtolower($name); |
| 71 | - if (! file_exists($path = resource_path('views/admin/'.$lowername))) { |
|
| 71 | + if (!file_exists($path = resource_path('views/admin/'.$lowername))) { |
|
| 72 | 72 | mkdir($path, 0777, true); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - if (! file_exists($path = resource_path('views/admin/layouts/modules/'.$lowername))) { |
|
| 75 | + if (!file_exists($path = resource_path('views/admin/layouts/modules/'.$lowername))) { |
|
| 76 | 76 | mkdir($path, 0777, true); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | */ |
| 169 | 169 | protected function registerRoutes() |
| 170 | 170 | { |
| 171 | - Route::group($this->routeConfiguration(), function () { |
|
| 171 | + Route::group($this->routeConfiguration(), function() { |
|
| 172 | 172 | $this->loadRoutesFrom(__DIR__.'/../../routes/web.php'); |
| 173 | 173 | }); |
| 174 | 174 | } |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | protected function directives() |
| 214 | 214 | { |
| 215 | - Blade::if('hasRole', function ($roles) { |
|
| 215 | + Blade::if ('hasRole', function($roles) { |
|
| 216 | 216 | $hasAccess = false; |
| 217 | 217 | $roles_array = explode('|', $roles); |
| 218 | 218 | foreach ($roles_array as $role) { |
@@ -221,10 +221,10 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | return $hasAccess; |
| 223 | 223 | }); |
| 224 | - Blade::if('preference', function ($preference_name, $default_value) { |
|
| 224 | + Blade::if ('preference', function($preference_name, $default_value) { |
|
| 225 | 225 | return preference($preference_name, $default_value); |
| 226 | 226 | }); |
| 227 | - Blade::directive('setting', function ($setting_name) { |
|
| 227 | + Blade::directive('setting', function($setting_name) { |
|
| 228 | 228 | return "<?php echo setting($setting_name) ?>"; |
| 229 | 229 | }); |
| 230 | 230 | } |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | */ |
| 302 | 302 | protected function getFacades() |
| 303 | 303 | { |
| 304 | - $this->app->bind('adminetic', function ($app) { |
|
| 304 | + $this->app->bind('adminetic', function($app) { |
|
| 305 | 305 | return new Adminetic(); |
| 306 | 306 | }); |
| 307 | 307 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | { |
| 75 | 75 | $modelTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/MyMenu.stub'); |
| 76 | 76 | |
| 77 | - if (! file_exists($path = app_path('Services'))) { |
|
| 77 | + if (!file_exists($path = app_path('Services'))) { |
|
| 78 | 78 | mkdir($path, 0777, true); |
| 79 | 79 | } |
| 80 | 80 | |
@@ -92,13 +92,13 @@ discard block |
||
| 92 | 92 | $myDashboardTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/MyDashboard.stub'); |
| 93 | 93 | $myDashboardIndexTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/DashboardIndex.stub'); |
| 94 | 94 | |
| 95 | - if (! file_exists($path = app_path('Services'))) { |
|
| 95 | + if (!file_exists($path = app_path('Services'))) { |
|
| 96 | 96 | mkdir($path, 0777, true); |
| 97 | 97 | } |
| 98 | - if (! file_exists($path = resource_path('views/admin/dashboard'))) { |
|
| 98 | + if (!file_exists($path = resource_path('views/admin/dashboard'))) { |
|
| 99 | 99 | mkdir($path, 0777, true); |
| 100 | 100 | } |
| 101 | - if (! file_exists($path = resource_path('views/admin/layouts/modules/dashboard'))) { |
|
| 101 | + if (!file_exists($path = resource_path('views/admin/layouts/modules/dashboard'))) { |
|
| 102 | 102 | mkdir($path, 0777, true); |
| 103 | 103 | } |
| 104 | 104 | $myDashboardIndexfile = resource_path('views/admin/dashboard/index.blade.php'); |
@@ -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 = Adminetic::user()->create([ |
| 21 | 21 | 'name' => 'Admin User', |
| 22 | 22 | 'email' => '[email protected]', |