@@ -15,11 +15,11 @@ |
||
| 15 | 15 | { |
| 16 | 16 | parent::boot(); |
| 17 | 17 | |
| 18 | - static::saving(function () { |
|
| 18 | + static::saving(function() { |
|
| 19 | 19 | self::cacheKey(); |
| 20 | 20 | }); |
| 21 | 21 | |
| 22 | - static::deleting(function () { |
|
| 22 | + static::deleting(function() { |
|
| 23 | 23 | self::cacheKey(); |
| 24 | 24 | }); |
| 25 | 25 | } |
@@ -15,11 +15,11 @@ |
||
| 15 | 15 | { |
| 16 | 16 | parent::boot(); |
| 17 | 17 | |
| 18 | - static::saving(function () { |
|
| 18 | + static::saving(function() { |
|
| 19 | 19 | self::cacheKey(); |
| 20 | 20 | }); |
| 21 | 21 | |
| 22 | - static::deleting(function () { |
|
| 22 | + static::deleting(function() { |
|
| 23 | 23 | self::cacheKey(); |
| 24 | 24 | }); |
| 25 | 25 | } |
@@ -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 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | { |
| 81 | 81 | $modelTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/MyMenu.stub'); |
| 82 | 82 | |
| 83 | - if (! file_exists($path = app_path('Services'))) { |
|
| 83 | + if (!file_exists($path = app_path('Services'))) { |
|
| 84 | 84 | mkdir($path, 0777, true); |
| 85 | 85 | } |
| 86 | 86 | |
@@ -98,13 +98,13 @@ discard block |
||
| 98 | 98 | $myDashboardTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/MyDashboard.stub'); |
| 99 | 99 | $myDashboardIndexTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/DashboardIndex.stub'); |
| 100 | 100 | |
| 101 | - if (! file_exists($path = app_path('Services'))) { |
|
| 101 | + if (!file_exists($path = app_path('Services'))) { |
|
| 102 | 102 | mkdir($path, 0777, true); |
| 103 | 103 | } |
| 104 | - if (! file_exists($path = resource_path('views/admin/dashboard'))) { |
|
| 104 | + if (!file_exists($path = resource_path('views/admin/dashboard'))) { |
|
| 105 | 105 | mkdir($path, 0777, true); |
| 106 | 106 | } |
| 107 | - if (! file_exists($path = resource_path('views/admin/layouts/modules/dashboard'))) { |
|
| 107 | + if (!file_exists($path = resource_path('views/admin/layouts/modules/dashboard'))) { |
|
| 108 | 108 | mkdir($path, 0777, true); |
| 109 | 109 | } |
| 110 | 110 | $myDashboardIndexfile = resource_path('views/admin/dashboard/index.blade.php'); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | { |
| 136 | 136 | $myHeaderTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/HeaderView.stub'); |
| 137 | 137 | |
| 138 | - if (! file_exists($path = resource_path('views/admin/layouts/components'))) { |
|
| 138 | + if (!file_exists($path = resource_path('views/admin/layouts/components'))) { |
|
| 139 | 139 | mkdir($path, 0777, true); |
| 140 | 140 | } |
| 141 | 141 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | { |
| 153 | 153 | $myFooterTemplate = file_get_contents(__DIR__.'/../../Console/Commands/AdminStubs/FooterView.stub'); |
| 154 | 154 | |
| 155 | - if (! file_exists($path = resource_path('views/admin/layouts/components'))) { |
|
| 155 | + if (!file_exists($path = resource_path('views/admin/layouts/components'))) { |
|
| 156 | 156 | mkdir($path, 0777, true); |
| 157 | 157 | } |
| 158 | 158 | |
@@ -13,10 +13,10 @@ discard block |
||
| 13 | 13 | * @return callable |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | - return function ($options = []) { |
|
| 16 | + return function($options = []) { |
|
| 17 | 17 | $namespace = "Pratiksh\Adminetic\Http\Controllers"; |
| 18 | 18 | |
| 19 | - $this->group(['namespace' => $namespace], function () use ($options) { |
|
| 19 | + $this->group(['namespace' => $namespace], function() use ($options) { |
|
| 20 | 20 | if ($options['home'] ?? true) { |
| 21 | 21 | $this->view('/', 'adminetic::welcome'); |
| 22 | 22 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function resetPassword() |
| 87 | 87 | { |
| 88 | - return function () { |
|
| 88 | + return function() { |
|
| 89 | 89 | $this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request'); |
| 90 | 90 | $this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email'); |
| 91 | 91 | $this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset'); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function confirmPassword() |
| 102 | 102 | { |
| 103 | - return function () { |
|
| 103 | + return function() { |
|
| 104 | 104 | $this->get('password/confirm', 'Auth\ConfirmPasswordController@showConfirmForm')->name('password.confirm'); |
| 105 | 105 | $this->post('password/confirm', 'Auth\ConfirmPasswordController@confirm'); |
| 106 | 106 | }; |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | public function emailVerification() |
| 115 | 115 | { |
| 116 | - return function () { |
|
| 116 | + return function() { |
|
| 117 | 117 | $this->get('email/verify', 'Auth\VerificationController@show')->name('verification.notice'); |
| 118 | 118 | $this->get('email/verify/{id}/{hash}', 'Auth\VerificationController@verify')->name('verification.verify'); |
| 119 | 119 | $this->post('email/resend', 'Auth\VerificationController@resend')->name('verification.resend'); |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | * @param string $route |
| 7 | 7 | *@return string |
| 8 | 8 | */ |
| 9 | -if (! function_exists('adminBaseUrl')) { |
|
| 9 | +if (!function_exists('adminBaseUrl')) { |
|
| 10 | 10 | function adminBaseUrl($route) |
| 11 | 11 | { |
| 12 | 12 | return url(config('admin.prefix', 'admin').'/'.$route); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | *@param string $route |
| 20 | 20 | *@return string |
| 21 | 21 | */ |
| 22 | -if (! function_exists('adminRedirectRoute')) { |
|
| 22 | +if (!function_exists('adminRedirectRoute')) { |
|
| 23 | 23 | function adminRedirectRoute($route) |
| 24 | 24 | { |
| 25 | 25 | return adminBaseUrl($route); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | *@param string $route |
| 33 | 33 | *@return string |
| 34 | 34 | */ |
| 35 | -if (! function_exists('adminCreateRoute')) { |
|
| 35 | +if (!function_exists('adminCreateRoute')) { |
|
| 36 | 36 | function adminCreateRoute($route) |
| 37 | 37 | { |
| 38 | 38 | return adminBaseUrl($route).'/create'; |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | *@param int $id |
| 47 | 47 | *@return return_type |
| 48 | 48 | */ |
| 49 | -if (! function_exists('adminShowRoute')) { |
|
| 49 | +if (!function_exists('adminShowRoute')) { |
|
| 50 | 50 | function adminShowRoute($route, $id) |
| 51 | 51 | { |
| 52 | 52 | return adminBaseUrl($route).'/'.$id; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | *@param int $id |
| 61 | 61 | *@return string |
| 62 | 62 | */ |
| 63 | -if (! function_exists('adminEditRoute')) { |
|
| 63 | +if (!function_exists('adminEditRoute')) { |
|
| 64 | 64 | function adminEditRoute($route, $id) |
| 65 | 65 | { |
| 66 | 66 | return adminBaseUrl($route).'/'.$id.'/edit'; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | *@param string $route |
| 74 | 74 | *@return string |
| 75 | 75 | */ |
| 76 | -if (! function_exists('adminStoreRoute')) { |
|
| 76 | +if (!function_exists('adminStoreRoute')) { |
|
| 77 | 77 | function adminStoreRoute($route) |
| 78 | 78 | { |
| 79 | 79 | return adminBaseUrl($route); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | *@param int $id |
| 88 | 88 | *@return string |
| 89 | 89 | */ |
| 90 | -if (! function_exists('adminUpdateRoute')) { |
|
| 90 | +if (!function_exists('adminUpdateRoute')) { |
|
| 91 | 91 | function adminUpdateRoute($route, $id) |
| 92 | 92 | { |
| 93 | 93 | return adminBaseUrl($route).'/'.$id; |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | *@param int $id |
| 102 | 102 | *@return string |
| 103 | 103 | */ |
| 104 | -if (! function_exists('adminDeleteRoute')) { |
|
| 104 | +if (!function_exists('adminDeleteRoute')) { |
|
| 105 | 105 | function adminDeleteRoute($route, $id) |
| 106 | 106 | { |
| 107 | 107 | return adminBaseUrl($route).'/'.$id; |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | public function indexPermission() |
| 15 | 15 | { |
| 16 | 16 | $permissions = config('adminetic.caching', true) |
| 17 | - ? (Cache::has('permissions') ? Cache::get('permissions') : Cache::rememberForever('permissions', function () { |
|
| 17 | + ? (Cache::has('permissions') ? Cache::get('permissions') : Cache::rememberForever('permissions', function() { |
|
| 18 | 18 | return Permission::with('role')->get(); |
| 19 | 19 | })) |
| 20 | 20 | : Permission::with('role')->get(); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | public function indexRole() |
| 14 | 14 | { |
| 15 | 15 | $roles = config('adminetic.caching', true) |
| 16 | - ? (Cache::has('roles') ? Cache::get('roles') : Cache::rememberForever('roles', function () { |
|
| 16 | + ? (Cache::has('roles') ? Cache::get('roles') : Cache::rememberForever('roles', function() { |
|
| 17 | 17 | return Role::all(); |
| 18 | 18 | })) |
| 19 | 19 | : Role::all(); |