Skip to content

Commit

Permalink
Fixed last volt bug
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminhansen committed Sep 25, 2024
1 parent c0b36bb commit 5899feb
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/MakeView.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,19 @@ public function handle()

$volt = $this->option('volt');

if(confirm(label: 'Should this view extend a parent view?', default: false, yes: 'Yes', no: 'No')) {
$extends = $this->option('extends') ?? env('BASE_VIEW');
$extends = str_replace(['/'], '.', $extends);
if($volt) {
$extends = null;
} else {
if(confirm(label: 'Should this view extend a parent view?', default: false, yes: 'Yes', no: 'No')) {
$extends = $this->option('extends') ?? env('BASE_VIEW');
$extends = str_replace(['/'], '.', $extends);

if(!$extends) {
$extends = text(label: 'What view should this new view extend?', placeholder: 'layouts.app');
if(!$extends) {
$extends = text(label: 'What view should this new view extend?', placeholder: 'layouts.app');
}
} else {
$extends = null;
}
} else {
$extends = null;
}

if(!$volt) {
Expand Down

0 comments on commit 5899feb

Please sign in to comment.