fillForm doesn't work while trying to test a Singular Resource
Hi,
I created a Singular Resource as explained here https://filamentphp.com/docs/4.x/resources/singular
My view is exactly the same as in the documentation and my page's form method is a little bit different since this page is here to create a new record instead of updating an existing one. Therefore I'm using
model
instead of record
:
Here's how i'm testing the creation process:
but I get this error when the fillForm
method is called:
4 Replies
It looks like it's because
$this->instance()
is null.
Could this be because I'm using a custom view? Though it's still a livewire component
Thanks in advance for your helpSolution
are you sure that you are authorized to view the component?
if you run
livewire(ContactUs::class)->assertSuccessful()
does it pass without the rest of the code?
usually, the instance() is null if it fails to load/render in some wayhey
thanks a lot for you answer you were right it was a permission issue
I didn't noticed because i was using a superadmin user in my browser...
Thanks again 🙂