Nova Image storage to directory being created at the same time
OK lets see if I can explain what I am trying to do.
I have the following for example:
Text::make('Title')->sortable()->rules('required'),
Slug::make('Slug')->from('Title')
....
Image::make('Display Image')->disk('events');
So far so good and all will work as expected and the image would upload into a folder called events.
But! I hear myself say 😀
What I want to do is create a folder with in the Events folder named via the slug value.
EG Slug: welcome-to-my-example-event
So I would like to pass down the slug value to the Image creation and call, to then be used to create a sub directory via this slug name, and then save the image into it.
SO the directory woudl then be events/welcome-to-my-example-event
Why? So I can keep relevant images into their own groups.
So is it possible to get these values, in order to grab the slug value and use it with in an Image function before saving etc etc.
I can achieve this the normal way through my controller / model, and have done many a time.
Wondering if possible via the Invokables file method?
Thanks
Please or to participate in this conversation.