Skip to content

Commit

Permalink
Add check for config existence
Browse files Browse the repository at this point in the history
  • Loading branch information
QuintenJustus committed Oct 23, 2022
1 parent 6737eda commit 4bab3d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.0",
"version": "1.0.1",
"name": "protoqol/quasi",
"description": "Quasi",
"keywords": [
Expand Down
12 changes: 7 additions & 5 deletions src/Console/QuasiResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public function handle()
/**
* Replace the class name for the given stub.
*
* @param string $stub
* @param string $name
* @param string $stub
* @param string $name
*
* @return string
*/
Expand All @@ -68,7 +68,7 @@ protected function replaceClass($stub, $name): string
/**
* Replace keys.
*
* @param string $stub
* @param string $stub
*
* @return string
*/
Expand All @@ -81,8 +81,10 @@ protected function replaceKeys(string &$stub): string
$string = '';

foreach ($columns as $column) {
if (in_array($column, config('quasi.exclude'), true)) {
continue;
if (config('quasi.exclude', false)) {
if (in_array($column, config('quasi.exclude'), true)) {
continue;
}
}

$string .= "'$column' => \$this->$column,
Expand Down

0 comments on commit 4bab3d6

Please sign in to comment.