mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Revert "fix: handle panel ID correctly in make:filament-resource command"
This reverts commit ed5277f5f2.
This commit is contained in:
@@ -12,7 +12,6 @@ use Filament\Support\Commands\Concerns\CanReadModelSchemas;
|
||||
use Filament\Tables\Commands\Concerns\CanGenerateTables;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
use function Laravel\Prompts\select;
|
||||
@@ -83,18 +82,13 @@ class MakeResourceCommand extends Command
|
||||
$pluralModelClass = (string) str($modelClass)->pluralStudly();
|
||||
$needsAlias = $modelClass === 'Record';
|
||||
|
||||
$panelOption = Str::lcfirst($this->option('panel'));
|
||||
$panel = $this->option('panel');
|
||||
|
||||
if ($panelOption) {
|
||||
$panel = Filament::getPanel($panelOption);
|
||||
|
||||
if ($panel->getId() !== $panelOption) {
|
||||
$this->components->error("Panel [{$panelOption}] not found.");
|
||||
return static::INVALID;
|
||||
}
|
||||
if ($panel) {
|
||||
$panel = Filament::getPanel($panel);
|
||||
}
|
||||
|
||||
if (! $panelOption) {
|
||||
if (! $panel) {
|
||||
$panels = Filament::getPanels();
|
||||
|
||||
/** @var Panel $panel */
|
||||
|
||||
Reference in New Issue
Block a user