Skip to content

Commit

Permalink
Add --force flag to allow the user to regenerate board file if it alr…
Browse files Browse the repository at this point in the history
…eady exists mokhosh#59

Instead of removing the kanban board file then run the command again, user can add --force and voila!
  • Loading branch information
Cybrarist committed Oct 1, 2024
0 parents commit 1b4ea13
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/Commands/MakeKanbanBoardCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace Mokhosh\FilamentKanban\Commands;

use Illuminate\Console\GeneratorCommand;

class MakeKanbanBoardCommand extends GeneratorCommand
{
public $description = 'Create a filament kanban board page';

public $type = 'Kanban page';

protected $signature = 'make:kanban {name} {--force : Force kanban board to recreated}';

protected function getStub()
{
return file_exists($customPath = $this->laravel->basePath('/stubs/filament-kanban/board.stub'))
? $customPath
: __DIR__.'/../../stubs/board.stub';
}

protected function getDefaultNamespace($rootNamespace)
{
return $rootNamespace.'\Filament\Pages';
}
}

0 comments on commit 1b4ea13

Please sign in to comment.