0

I would like to create custom Create/Update logic for one of my Nova Resource. I have been thinking to use Custom Tools to accomplish what i wanted, but i don't want to give up the excellent work in the Index page and rewrite it all myself.

My use case:

  • I want to have an input that can define how many record to be created recursively.
  • I want to have morphToMany selection input in the form.
Terry Tan
  • 421
  • 5
  • 12

1 Answers1

2

If you want to use different components on the index vs form/detail page just use the hideFromIndex and onlyOnIndex functions.

Detailed reference to docs: https://nova.laravel.com/docs/1.0/resources/fields.html#showing-hiding-fields

If you want to build repetitive fields, you can use the package: https://packagist.org/packages/fourstacks/nova-repeatable-fields

Paras
  • 9,258
  • 31
  • 55
  • 1
    That will not accomplish what i want based on my use case. – Terry Tan Oct 25 '18 at 02:52
  • As I understand your use case, you already have developed the field to create multiple records and you just want to hide from the index page. If that is true, you can just use the hideFromIndex function. If not, please explain your use case in more detail – Paras Oct 25 '18 at 03:17
  • sorry for not explaining clearly. Since u understand my use case, then those inputs are what i want to build, but i not sure which way to is better. – Terry Tan Oct 25 '18 at 03:35
  • Have updated my answer to include how to build repeatable fields – Paras Oct 25 '18 at 03:53