Search code examples
laravel-nova

Fields from another table in Laravel Nova


Laravel Nova 3.8. How can I create a new fields in a resource that will be saved to another table when the resource is updated? Without creating a second resource. Is it possible? Didn't find this in the documentation


Solution

  • You can declare fields in resource and after that use YourModelObserver saving method to create some data in another table from request