@@ -24,12 +24,12 @@ discard block |
||
24 | 24 | |
25 | 25 | $path = resource_path("cruds/{$name}.php"); |
26 | 26 | |
27 | - if($this->files->exists($path) and !$this->option('force')){ |
|
27 | + if ($this->files->exists($path) and !$this->option('force')) { |
|
28 | 28 | $this->warn("'{$name}.php' already exists in CRUDs config"); |
29 | 29 | return; |
30 | 30 | } |
31 | 31 | |
32 | - if (! $this->files->isDirectory(dirname($path))) { |
|
32 | + if (!$this->files->isDirectory(dirname($path))) { |
|
33 | 33 | $this->files->makeDirectory(dirname($path), 0755, true); |
34 | 34 | } |
35 | 35 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | { |
63 | 63 | $model = $this->qualifyModel($this->getNameInput()); |
64 | 64 | |
65 | - if(!class_exists($model)){ |
|
65 | + if (!class_exists($model)) { |
|
66 | 66 | $this->warn("Model option should be valid and model should be exist"); |
67 | 67 | die(); |
68 | 68 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | private function withAuth() |
74 | 74 | { |
75 | 75 | $fillableList = $this->getFillableList(); |
76 | - if(!in_array('user_id', $fillableList)){ |
|
76 | + if (!in_array('user_id', $fillableList)) { |
|
77 | 77 | return 'true'; |
78 | 78 | } |
79 | 79 | |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | { |
92 | 92 | $fillableList = $this->getFillableList(); |
93 | 93 | $array = []; |
94 | - foreach ($fillableList as $fillable){ |
|
95 | - if(!Str::contains($fillable, 'id')){ |
|
94 | + foreach ($fillableList as $fillable) { |
|
95 | + if (!Str::contains($fillable, 'id')) { |
|
96 | 96 | $array[] = "'$fillable'"; |
97 | 97 | } |
98 | 98 | } |