src/Icr.php
public static function uploadImage(UploadedFile $uploadedFile, $context, $storage = 'local', $fileName = null)
    {
        $file = Facades\File::get($uploadedFile);
        /** @var Processor $processor */
        $processor = app('icr.processor');
        return $processor->upload(
            $context,
            $file,
            $uploadedFile->getClientOriginalExtension(),
            Facades\Storage::disk($storage),
            $fileName
        );
    }
public static function uploadImage(UploadedFile $uploadedFile, $context, $storage = 'local', $fileName = null)
    {
        $file = Facades\File::get($uploadedFile);
        /** @var Processor $processor */
        $processor = app('icr.processor');
        return $processor->upload(
            $context,
            $file,
            $uploadedFile->getClientOriginalExtension(),
            Facades\Storage::disk($storage),
            $fileName
        );
    }
public static function uploadImage ( UploadedFile $ uploadedFile , $ context , $ storage = 'local' , $ fileName = null ) { $ file = Facades \ File :: get ( $ uploadedFile ) ; /** @var Processor $processor */ $ processor = app ( 'icr.processor' ) ; return $ processor -> upload ( $ context , $ file , $ uploadedFile -> getClientOriginalExtension ( ) , Facades \ Storage :: disk ( $ storage ) , $ fileName ) ; }
Handles upload image. Returns exception instance on error or file name on success.

@param UploadedFile $uploadedFile
@param string $context
@param string $storage
@param null|string $fileName

@return \Exception|string
@throws \Exception
Handles upload image . Returns exception instance on error or file name on success .