@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | public function handle() |
| 23 | 23 | { |
| 24 | - if(!$this->option('model')){ |
|
| 24 | + if (!$this->option('model')) { |
|
| 25 | 25 | $this->error("Model option must have a value"); |
| 26 | 26 | return; |
| 27 | 27 | } |
@@ -33,16 +33,16 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | $path = resource_path("cruds/{$name}.php"); |
| 35 | 35 | |
| 36 | - if (! $this->files->isDirectory(dirname($path))) { |
|
| 36 | + if (!$this->files->isDirectory(dirname($path))) { |
|
| 37 | 37 | $this->files->makeDirectory(dirname($path), 0755, true); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - if($this->files->exists($path) and !$this->option('force')){ |
|
| 40 | + if ($this->files->exists($path) and !$this->option('force')) { |
|
| 41 | 41 | $this->warn("'{$name}' exists in CRUDs config"); |
| 42 | 42 | return; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - if($name != strtolower($this->option('model'))){ |
|
| 45 | + if ($name != strtolower($this->option('model'))) { |
|
| 46 | 46 | $this->warn("'{$name}' must be equal to model name"); |
| 47 | 47 | return; |
| 48 | 48 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | $model = $this->qualifyModel($this->option('model')); |
| 57 | 57 | |
| 58 | - if(!class_exists($model)){ |
|
| 58 | + if (!class_exists($model)) { |
|
| 59 | 59 | $this->warn("Model option should be valid and model should be exist"); |
| 60 | 60 | die(); |
| 61 | 61 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | $user = $this->argument('user'); |
| 20 | 20 | |
| 21 | - if($this->askResult($user)){ |
|
| 21 | + if ($this->askResult($user)) { |
|
| 22 | 22 | UserProviderFacade::deleteAdmin($user); |
| 23 | 23 | $this->info('Admin was removed successfully'); |
| 24 | 24 | return; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | public function askResult($user) |
| 31 | 31 | { |
| 32 | - if($this->option('force')) { |
|
| 32 | + if ($this->option('force')) { |
|
| 33 | 33 | return true; |
| 34 | 34 | } |
| 35 | 35 | $result = $this->confirm("Do you want to remove {$user} from administration", 'yes'); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | public function handle() |
| 17 | 17 | { |
| 18 | 18 | $names = (array) $this->argument('name') ?: config('easy_panel.actions', []); |
| 19 | - if($names == null) { |
|
| 19 | + if ($names == null) { |
|
| 20 | 20 | throw new CommandNotFoundException("There is no action in config file"); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | if ($this->askResult($name)) { |
| 30 | 30 | File::deleteDirectory(resource_path("/views/livewire/admin/$name")); |
| 31 | - File::deleteDirectory(app_path("/Http/Livewire/Admin/" . ucfirst($name))); |
|
| 31 | + File::deleteDirectory(app_path("/Http/Livewire/Admin/".ucfirst($name))); |
|
| 32 | 32 | $this->info("{$name} files were deleted, make sure you will delete {$name} value from actions in config"); |
| 33 | 33 | } else { |
| 34 | 34 | $this->line("process for {$name} action was canceled."); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | public function askResult($name) |
| 41 | 41 | { |
| 42 | - if($this->option('force')) { |
|
| 42 | + if ($this->option('force')) { |
|
| 43 | 43 | return true; |
| 44 | 44 | } |
| 45 | 45 | $result = $this->confirm("Do you really want to delete {$name} files ?", true); |