src/Http/Controllers/Adminarea/ServiceMediaController.php
public function store(ImageFormRequest $request, Service $service): void
    {
        $service->addMediaFromRequest('file')
             ->sanitizingFileName(function ($fileName) {
                 return md5($fileName).'.'.pathinfo($fileName, PATHINFO_EXTENSION);
             })
             ->toMediaCollection('default', config('cortex.bookings.media.disk'));
    }
public function store(ImageFormRequest $request, Service $service): void
    {
        $service->addMediaFromRequest('file')
             ->sanitizingFileName(function ($fileName) {
                 return md5($fileName).'.'.pathinfo($fileName, PATHINFO_EXTENSION);
             })
             ->toMediaCollection('default', config('cortex.bookings.media.disk'));
    }
public function store ( ImageFormRequest $ request , Service $ service ) : void { $ service -> addMediaFromRequest ( 'file' ) -> sanitizingFileName ( function ( $ fileName ) { return md5 ( $ fileName ) . '.' . pathinfo ( $ fileName , PATHINFO_EXTENSION ) ; } ) -> toMediaCollection ( 'default' , config ( 'cortex.bookings.media.disk' ) ) ; }
Store new service media.

@param \Cortex\Foundation\Http\Requests\ImageFormRequest $request
@param \Cortex\Bookings\Models\Service                   $service

@return void
Store new service media .