@@ -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'); |
@@ -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; |
@@ -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 | // Login Routes... |
21 | 21 | if ($options['login'] ?? true) { |
22 | 22 | $this->get('login', 'Auth\LoginController@showLoginForm')->name('login'); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function resetPassword() |
84 | 84 | { |
85 | - return function () { |
|
85 | + return function() { |
|
86 | 86 | $this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request'); |
87 | 87 | $this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email'); |
88 | 88 | $this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset'); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function confirmPassword() |
99 | 99 | { |
100 | - return function () { |
|
100 | + return function() { |
|
101 | 101 | $this->get('password/confirm', 'Auth\ConfirmPasswordController@showConfirmForm')->name('password.confirm'); |
102 | 102 | $this->post('password/confirm', 'Auth\ConfirmPasswordController@confirm'); |
103 | 103 | }; |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function emailVerification() |
112 | 112 | { |
113 | - return function () { |
|
113 | + return function() { |
|
114 | 114 | $this->get('email/verify', 'Auth\VerificationController@show')->name('verification.notice'); |
115 | 115 | $this->get('email/verify/{id}/{hash}', 'Auth\VerificationController@verify')->name('verification.verify'); |
116 | 116 | $this->post('email/resend', 'Auth\VerificationController@resend')->name('verification.resend'); |
@@ -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 | ]); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | public function indexPermission() |
15 | 15 | { |
16 | 16 | $permissions = config('coderz.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('coderz.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(); |
@@ -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(); |
@@ -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 | ]); |
@@ -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 | } |