From 5899feb37aee6f22665823bdb665b1baa0295aad Mon Sep 17 00:00:00 2001 From: BJ Hansen Date: Tue, 24 Sep 2024 20:32:09 -0500 Subject: [PATCH] Fixed last volt bug --- src/MakeView.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/MakeView.php b/src/MakeView.php index 0c1928b..5d001fc 100644 --- a/src/MakeView.php +++ b/src/MakeView.php @@ -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) {