Custom page that's create a record
Hello i am trying to make a custom page that has a form that can create a record for my model. Unfornatly it is not working right now. I can't find the best example on the internet someone can help?
13 Replies
you need to create array $fillable in your model. Ex: $fillable = ["test1","test2",...]. YOu also ned to make a migration containing said columns.
Already got all that 🙂
mag ik je blade ff zien?
Also, what do you mean it doesnt work? Its not showing, or its not saving?
tuurlijk kerel
It isn't saving
This is the form in the filament page
try this:
the problem is your are displaying the form, but not submitting it
yeah now it is submitting but still not saving 🤔
try now. I added a line
When i submit him now i think he wants to add a modal beneath the button right?
If that doesnt work, try this trick to debug models:
php artisan tinker
RequestDomain::all()
Just isn't creating them
Hi @Quin. Try based on my code. It is working for me. I have separate Seller panel with different Authentication guard. I am tring to fetch, edit or update my record in 'sellers' table whose resource is managed by Admin panel. Below is my working code for a Custom page created in Seller panel.
I fixed it ty for all your answers guys 😄
i made a save function that we call on the action we give the wire:submit that function and it was done, made it all to complicated for my self