F
Filament13mo ago
LordJoo

Use Actions in Custom Pages

Hello guys I've a custom page with a custom view and I'm trying to use Filament Actions inside this page My Code for the page class ListContentTypes extends Page { use HasParentActions; protected static ?string $navigationIcon = 'heroicon-o-document-text'; protected static string $view = 'ninjaportal-admin::content-types.list'; protected array $postTypes; public function mount() {...} public function getEditAction($slug) { return Action::make('edit') ->label(__("Edit Content Type")) ->icon('heroicon-o-pencil') ->url(route(EditContentTypes::getRouteName(), $slug)); } and this is the blade <x-filament-panels::page> <div> <table class="> <thead class="bg-gray-50 dark:bg-white/5"> <tr class=""> <th class="text-left py-4 ps-3"> @lang('Name') </th> <th class="text-right w-32 pe-3"> @lang('Action') </th> </tr> </thead> <tbody> @foreach ($types as $type) <tr class="py-4"> <td>{{ $type->getName() }}</td> <td class="text-sm ps-3 py-4"> <x-filament-actions::action :action="$this->getEditAction($type->getSlug())" /> </td> </tr> @endforeach </tbody> </table> </div> </x-filament-panels::page> and I'm getting this error Undefined variable $dynamicComponent
No description
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server