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

@param \Cortex\Foundation\Http\Requests\ImageFormRequest $request
@param \Cortex\Tenants\Models\Tenant                     $tenant

@return void
Store new tenant media .