label(__('filament.actions.models.list.assign_hashids.name')); $this->visible(Gate::allows('create', Playlist::class)); $this->action(fn (BaseModel $record) => $this->handle($record)); } public function handle(BaseModel $model): void { $action = new AssignHashids(); if ($model instanceof HasHashids) { $action->assign($model, $this->connection); } } /** * Set the connection. */ public function setConnection(?string $connection): static { $this->connection = $connection; return $this; } }