@@ -47,14 +47,14 @@ |
||
| 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; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | { |
| 79 | 79 | $profile = $p ?? Auth::user()->profile ?? Auth::user()->profile()->create(); |
| 80 | 80 | |
| 81 | - 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.gif'); |
|
| 81 | + 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.gif'); |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | if (!function_exists('random_color')) { |
| 165 | 165 | function random_color() |
| 166 | 166 | { |
| 167 | - return random_color_part() . random_color_part() . random_color_part(); |
|
| 167 | + return random_color_part().random_color_part().random_color_part(); |
|
| 168 | 168 | } |
| 169 | 169 | } |
| 170 | 170 | |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | if (!function_exists('deleteImage')) { |
| 196 | 196 | function deleteImage($image) |
| 197 | 197 | { |
| 198 | - $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/' . $image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/' . $image)) : '') : ''; |
|
| 198 | + $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/'.$image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/'.$image)) : '') : ''; |
|
| 199 | 199 | } |
| 200 | 200 | } |
| 201 | 201 | |
@@ -254,8 +254,8 @@ discard block |
||
| 254 | 254 | function getImg($img, $default) |
| 255 | 255 | { |
| 256 | 256 | if (isset($img)) { |
| 257 | - if (file_exists(public_path('storage/' . $img))) { |
|
| 258 | - return asset('storage/' . $img); |
|
| 257 | + if (file_exists(public_path('storage/'.$img))) { |
|
| 258 | + return asset('storage/'.$img); |
|
| 259 | 259 | } elseif (file_exists(public_path($img))) { |
| 260 | 260 | return asset($img); |
| 261 | 261 | } else { |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | if (!function_exists('putContentToClassFunction')) { |
| 271 | 271 | function putContentToClassFunction($file, $function_name, $data, $closing_token = '}') |
| 272 | 272 | { |
| 273 | - $data = $data . "\n"; |
|
| 273 | + $data = $data."\n"; |
|
| 274 | 274 | // Read the contents of the file into a string |
| 275 | 275 | $contents = file_get_contents($file); |
| 276 | 276 | |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | $function_definition = substr($contents, $start_pos, $end_pos - $start_pos + 1); |
| 291 | 291 | |
| 292 | 292 | // Append the new content to the function definition |
| 293 | - $modified_function_definition = rtrim($function_definition, $closing_token) . $data . $closing_token; |
|
| 293 | + $modified_function_definition = rtrim($function_definition, $closing_token).$data.$closing_token; |
|
| 294 | 294 | |
| 295 | 295 | // Replace the original function definition with the modified one in the class definition |
| 296 | 296 | $modified_contents = substr_replace($contents, $modified_function_definition, $start_pos, $end_pos - $start_pos + 1); |