Search code examples
laravellaravel-nova

Function Store : Laravel Nova 4


I'm migrating a project from a few months ago made with AdminLTE to Laravel Nova (mainly as part of my learning, I'm still a newbie in Laravel) and I have an issue that I don't know how to approach.

It's an employee check-in/out project, currently I have a simple single field form in welcome.blade.php which when entering the employee code makes a call to the controller route and using the store function , I create an attendance record in the database.

In Welcome:

<form method="POST" action="{{ route('attendance.store') }}"

Well, my question is with the configuration in Nova 4. Can I directly include the function in the resource like I did before in the controller? I have done it like this and I have created the route in web.php but it gives me a 419 error.

I like Nova and the admin panel builds very quickly but I'm still a bit lost with the structure...


Solution

  • for this purpose you can use action is better than this type of the post because you better using laravel action for all like this also you can add new package for custom resource