Passed
Push — main ( fcba82...0f5868 )
by PRATIK
14:07 queued 38s
created
src/Services/Adminetic.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         $children = [
164 164
             [
165 165
                 'type' => 'submenu',
166
-                'name' => 'All ' . $plural,
167
-                'is_active' => request()->routeIs($route . '.index') ? 'active' : '',
166
+                'name' => 'All '.$plural,
167
+                'is_active' => request()->routeIs($route.'.index') ? 'active' : '',
168 168
                 'link' => adminRedirectRoute($route),
169 169
                 'conditions' => [
170 170
                     [
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
             ],
176 176
             [
177 177
                 'type' => 'submenu',
178
-                'name' => 'Create ' . $route,
179
-                'is_active' => request()->routeIs($route . '.create') ? 'active' : '',
178
+                'name' => 'Create '.$route,
179
+                'is_active' => request()->routeIs($route.'.create') ? 'active' : '',
180 180
                 'link' => adminCreateRoute($route),
181 181
                 'conditions' => [
182 182
                     [
Please login to merge, or discard this patch.
src/Providers/AdmineticServiceProvider.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -126,26 +126,26 @@  discard block
 block discarded – undo
126 126
     {
127 127
         // Publish Config File
128 128
         $this->publishes([
129
-            __DIR__ . '/../../config/adminetic.php' => config_path('adminetic.php'),
129
+            __DIR__.'/../../config/adminetic.php' => config_path('adminetic.php'),
130 130
         ], 'adminetic-config');
131 131
         // Publish View Files
132 132
         $this->publishes([
133
-            __DIR__ . '/../../resources/views' => resource_path('views/vendor/adminetic'),
133
+            __DIR__.'/../../resources/views' => resource_path('views/vendor/adminetic'),
134 134
         ], 'adminetic-views');
135 135
         // Publish Migration Files
136 136
         $this->publishes([
137
-            __DIR__ . '/../../database/migrations' => database_path('migrations'),
137
+            __DIR__.'/../../database/migrations' => database_path('migrations'),
138 138
         ], 'adminetic-migrations');
139 139
         // Publish Database Seeds
140 140
         $this->publishes([
141
-            __DIR__ . '/../../database/seeders' => database_path('seeders'),
141
+            __DIR__.'/../../database/seeders' => database_path('seeders'),
142 142
         ], 'adminetic-seeders');
143 143
         $this->publishes([
144
-            __DIR__ . '/../../payload/assets' => public_path('adminetic/assets'),
144
+            __DIR__.'/../../payload/assets' => public_path('adminetic/assets'),
145 145
         ], 'adminetic-assets-files');
146 146
         // Publish Static Files
147 147
         $this->publishes([
148
-            __DIR__ . '/../../payload/static' => public_path('adminetic/static'),
148
+            __DIR__.'/../../payload/static' => public_path('adminetic/static'),
149 149
         ], 'adminetic-static-files');
150 150
     }
151 151
 
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
      */
157 157
     protected function registerResource()
158 158
     {
159
-        $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); // Loading Migration Files
160
-        $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'adminetic'); // Loading Views Files
159
+        $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); // Loading Migration Files
160
+        $this->loadViewsFrom(__DIR__.'/../../resources/views', 'adminetic'); // Loading Views Files
161 161
         $this->registerRoutes();
162 162
     }
163 163
 
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
      */
169 169
     protected function registerRoutes()
170 170
     {
171
-        Route::group($this->routeConfiguration(), function () {
172
-            $this->loadRoutesFrom(__DIR__ . '/../../routes/web.php');
171
+        Route::group($this->routeConfiguration(), function() {
172
+            $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');
173 173
         });
174 174
     }
175 175
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
      */
304 304
     protected function getFacades()
305 305
     {
306
-        $this->app->bind('adminetic', function ($app) {
306
+        $this->app->bind('adminetic', function($app) {
307 307
             return new Adminetic();
308 308
         });
309 309
     }
Please login to merge, or discard this patch.
src/Helpers/AdminHelper.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $profile = $p ?? Auth::user()->profile ?? Auth::user()->profile()->create();
71 71
 
72
-        return isset($profile->profile_pic) ? (Illuminate\Support\Str::contains($profile->profile_pic, ['https://', 'http://']) ? $profile->profile_pic : asset('storage/' . $profile->profile_pic)) : asset('adminetic/static/profile.jpg');
72
+        return isset($profile->profile_pic) ? (Illuminate\Support\Str::contains($profile->profile_pic, ['https://', 'http://']) ? $profile->profile_pic : asset('storage/'.$profile->profile_pic)) : asset('adminetic/static/profile.jpg');
73 73
     }
74 74
 }
75 75
 
@@ -90,35 +90,35 @@  discard block
 block discarded – undo
90 90
 if (!function_exists('favicon')) {
91 91
     function favicon()
92 92
     {
93
-        return setting('favicon') ? (asset('storage/' . setting('favicon'))) : asset('adminetic/static/favicon.png');
93
+        return setting('favicon') ? (asset('storage/'.setting('favicon'))) : asset('adminetic/static/favicon.png');
94 94
     }
95 95
 }
96 96
 
97 97
 if (!function_exists('logo')) {
98 98
     function logo()
99 99
     {
100
-        return setting('logo') ? (asset('storage/' . setting('logo'))) : asset('adminetic/static/logo.png');
100
+        return setting('logo') ? (asset('storage/'.setting('logo'))) : asset('adminetic/static/logo.png');
101 101
     }
102 102
 }
103 103
 
104 104
 if (!function_exists('dark_logo')) {
105 105
     function dark_logo()
106 106
     {
107
-        return setting('dark_logo') ? (asset('storage/' . setting('dark_logo'))) : asset('adminetic/static/logo_dark.png');
107
+        return setting('dark_logo') ? (asset('storage/'.setting('dark_logo'))) : asset('adminetic/static/logo_dark.png');
108 108
     }
109 109
 }
110 110
 
111 111
 if (!function_exists('getLogoBanner')) {
112 112
     function getLogoBanner()
113 113
     {
114
-        return setting('logo_banner') ? (asset('storage/' . setting('logo_banner'))) : asset('adminetic/static/logo_banner.jpg');
114
+        return setting('logo_banner') ? (asset('storage/'.setting('logo_banner'))) : asset('adminetic/static/logo_banner.jpg');
115 115
     }
116 116
 }
117 117
 
118 118
 if (!function_exists('login_register_bg_image')) {
119 119
     function login_register_bg_image()
120 120
     {
121
-        return setting('login_register_bg_image') ? (asset('storage/' . setting('login_register_bg_image'))) : asset('adminetic/static/login_register_bg_img.jpg');
121
+        return setting('login_register_bg_image') ? (asset('storage/'.setting('login_register_bg_image'))) : asset('adminetic/static/login_register_bg_img.jpg');
122 122
     }
123 123
 }
124 124
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 if (!function_exists('random_color')) {
140 140
     function random_color()
141 141
     {
142
-        return random_color_part() . random_color_part() . random_color_part();
142
+        return random_color_part().random_color_part().random_color_part();
143 143
     }
144 144
 }
145 145
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 if (!function_exists('deleteImage')) {
171 171
     function deleteImage($image)
172 172
     {
173
-        $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/' . $image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/' . $image)) : '') : '';
173
+        $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/'.$image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/'.$image)) : '') : '';
174 174
     }
175 175
 }
176 176
 
Please login to merge, or discard this patch.
src/Http/Livewire/Admin/User/UserTable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,14 +47,14 @@
 block discarded – undo
47 47
             case 2:
48 48
                 $this->resetPage();
49 49
                 $search = $this->search ?? null;
50
-                $data = $default->where('name', 'like', '%' . $search . '%')
51
-                    ->orWhere('email', 'like', '%' . $search . '%');
52
-                $this->information = 'Showing search results for "' . $search . '"';
50
+                $data = $default->where('name', 'like', '%'.$search.'%')
51
+                    ->orWhere('email', 'like', '%'.$search.'%');
52
+                $this->information = 'Showing search results for "'.$search.'"';
53 53
                 break;
54 54
             case 3:
55 55
                 $this->resetPage();
56 56
                 $role_id = $this->role ?? null;
57
-                $data = $role_id == '' ? $default : $default->whereHas('roles', function ($query) use ($role_id) {
57
+                $data = $role_id == '' ? $default : $default->whereHas('roles', function($query) use ($role_id) {
58 58
                     $query->where('role_id', $role_id);
59 59
                 });
60 60
                 break;
Please login to merge, or discard this patch.