Skip to content

Commit

Permalink
feat: Make page with select
Browse files Browse the repository at this point in the history
Select extends
  • Loading branch information
lee-to committed Dec 29, 2023
1 parent fa6d4d0 commit b4bd4ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@

use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Support\Facades\File;

use function Laravel\Prompts\{confirm, intro, outro, spin, warning};

use MoonShine\MoonShine;

use MoonShine\Providers\MoonShineServiceProvider;

use function Laravel\Prompts\{confirm, intro, outro, spin, warning};

class InstallCommand extends MoonShineCommand
{
protected $signature = 'moonshine:install {--u|without-user} {--m|without-migrations}';
Expand Down Expand Up @@ -127,6 +125,7 @@ protected function initDashboard(): void
{
$this->call(MakePageCommand::class, [
'className' => 'Dashboard',
'--force' => true
]);

$this->replaceInFile(
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/MakePageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class MakePageCommand extends MoonShineCommand
{
protected $signature = 'moonshine:page {className?} {--crud} {--dir=} {--extends=}';
protected $signature = 'moonshine:page {className?} {--force} {--crud} {--dir=} {--extends=}';

protected $description = 'Create page';

Expand All @@ -36,7 +36,7 @@ public function handle(): int
$dir = 'Pages';
}

if (! $this->option('extends') && ! $this->option('crud')) {
if (! $this->option('force') && ! $this->option('extends') && ! $this->option('crud')) {
$types = [
'' => 'Custom',
'IndexPage' => 'IndexPage',
Expand Down

0 comments on commit b4bd4ce

Please sign in to comment.