Your question is too generic. I suggest that you say what you actually want to do.
How to create custom CRUD in laravel-nova
I have created a "Resource" (for "Product" Model), and I need to customise its "create & update" page instead of nova's default. Is there any way to customise it ?
I have a product resource, I need to add multiple variants for the product. (variants based on size,color,..etc). The parent and child products should be saved in the products table. Is there any way to handle parent product and its child products in the same (product) resource
Consider a situation, I have a product like a shirt with different variations like red color with size L, red color M, blue color XXL, etc. Price and description may different
How can I manage this situation?
front end
https://www.awesomescreenshot.com/image/10593867?key=428cd9ef26697eb81463873b499c38f3
backend
https://www.awesomescreenshot.com/image/10594005?key=a6f414fc58e33f497d97f8916a05f44b
https://www.awesomescreenshot.com/image/10594125?key=50ff13548af4c94f1b0ddc29e1353770
For those types of situations, I support two options with Nova.
- Everything is manual. For every product, you need to enter everything manually.
- Allow import from CSV. Users can create a spreadsheet that contains all required information and you allow them to upload the CSV and you parse it and create items in the database accordingly.
@anishrp You don’t have a single product model. You have a product, that has many SKUs. In the case of a t-shirt, each variation would be its own SKU. The SKU would then have its own price and description.
For example:
- Product: T-Shirt
- SKU 1: Black / Size 12 / 15.00 INR
- SKU 2: Black / Size 13 / 15.00 INR
- SKU 3: Red / Size 12 / 15.00 INR
- SKU 4: Red / Size 13 / 15.00 INR
Thanks for the reply.
I need to create parent and its variants in a single create button, similar to the functionality in woocommerce.
Parent and each variant products are new records.
I need to dynamically add each product variant on a single screen.
*Product table has a column 'parent_product_id' which used to recognize variant products belongs to that parent product
You can use actions.
@martinbean How to save this using a single save button click and also how to handle edit?
Please or to participate in this conversation.