Custom page - invoking "standard" resource features

I have a custom filament page which generates results for example as shown in this image Each row will be a record from one of 4 tables (and I have a filament resource for each) . What I want to do is to click for example the "eye" icon and then show an infolist in a slideover for the specific id of the object. It seems to me that all the composnents etc already exist, just need to know how I might connect them together. Is this possible?
No description
Solution:
Am closing this now as I have redesigned my solution after watching some Laracast video content. Issue I have to solve is now I think much simpler - I started a new discussion for this entitled "Infolists / Action button"
Jump to solution
5 Replies
LeandroFerreira
instead of an icon, I think you can render an action with ->infolist([...])->slideOver()
jjo63
jjo63OP3w ago
OK thanks - how would i see what args have to be passed to the infolist() function - is that documented somewhere or is it a case of digging out the core filament code and habving a look at it?
jjo63
jjo63OP3w ago
Thanks for the pointers - been away on other tasks for a couple of days but am now back on this. So I have code that seems syntactically right but doesn't do as I want. In essence, I click a button in the blade defined thus: <div> <x-filament::button label="View" wire:click="slideObjAction({{ $result->id }})" /> <x-filament-actions::modals /> </div> Then the function slideObjAction is defined in my controller public function slideObjAction($id): Action { $record = ArchObject::find($id); $infolist = ArchObjectResource::infolist(Infolist::make()->record($record)); log::info('About to return view'); return Action::make('view') ->label('View Details') ->action(function () use ($infolist) { // Fetch the model using the ID $this->infolist($infolist); }) ->slideOver(); } When I click the button "nothing happens" and I don't see anything in laravel.log nor in the browser console to help diagnose the problem. Any ideas?
Solution
jjo63
jjo633w ago
Am closing this now as I have redesigned my solution after watching some Laracast video content. Issue I have to solve is now I think much simpler - I started a new discussion for this entitled "Infolists / Action button"

Did you find this page helpful?