name('filament-tables') ->hasCommands($this->getCommands()) ->hasTranslations() ->hasViews(); } public function packageBooted(): void { FilamentAsset::register([ AlpineComponent::make('table', __DIR__ . '/../dist/components/table.js'), ], 'filament/tables'); if ($this->app->runningInConsole()) { foreach (app(Filesystem::class)->files(__DIR__ . '/../stubs/') as $file) { $this->publishes([ $file->getRealPath() => base_path("stubs/filament/{$file->getFilename()}"), ], 'filament-stubs'); } } Testable::mixin(new TestsActions()); Testable::mixin(new TestsBulkActions()); Testable::mixin(new TestsColumns()); Testable::mixin(new TestsFilters()); Testable::mixin(new TestsRecords()); Testable::mixin(new TestsSummaries()); } /** * @return array */ protected function getCommands(): array { $commands = [ Commands\MakeColumnCommand::class, Commands\MakeTableCommand::class, ]; $aliases = []; foreach ($commands as $command) { $class = 'Filament\\Tables\\Commands\\Aliases\\' . class_basename($command); if (! class_exists($class)) { continue; } $aliases[] = $class; } return [ ...$commands, ...$aliases, ]; } }