Add info list to Page (with no resource)
I've read through the docos ...
i've created a page with no resource and edited the pages/page.php like so
but this isnt displaying, i get the nav link fine thou
15 Replies
Are you rendering the info list into the view blade?
i've not touched the view blade file
the way im readying the doco's is if i make a custome view for the resource i shouldnt need to?
so just an update, i've created a CustomePage -> with Resource this is my page:
and this is my customPages class php
i've adjusted my resource route like so
'index' => Pages\ListItem::route('/'),
so when i click on the link it takes me to this page but the damn info list isnt showing and it's really got me stumped.It won’t show unless you call it in the view blade as per. https://filamentphp.com/docs/3.x/infolists/adding-an-infolist-to-a-livewire-component#adding-the-infolist
Which looking at your last comment you have now.
What happens when you access the page.
it's blank =/
still no luck with this, any idea's?
you need to add HasForms, HasInfolists interfaces
and instead of extending Page try custom component?
i've add them to the custom page php?
is that not the right way?
so this is what i have right now:
in my sortBP.php my class is as follows:
from what i understand this should inject it into the page without needing to edit the blade.php file?
my page loads but it's empty
You still have to modify the blade file.
ok, so i've added
@livewire('sort-b-p-o')
to my page, not it errors saying it cant find component?
so i now have in my sort-b-p.blade.php file:
You don’t need the @livewire. The page is the livewire component. $this->infolist should be all you need at a minimum.
aha finally!
ok awsome thats working now with a plan list, next how do i inject/use my $model property from the resource?
this doesnt explain how i access the mode from the resource, the resource is exposed but i cant access it using record/model/modelname
so after a few hours trying i can see how you use the model from your resrouce in this