src/Product/Controllers/ProductController.php
public function uploadImage(Request $request)
    {
        $image = $request->image;

        $tmpPath = str_split(strtolower(str_random(3)));
        $checkDirectory = 'uploads/catalog/images/' . implode('/', $tmpPath);

        $dbPath = $checkDirectory . '/' . $image->getClientOriginalName();
        $image = Image::upload(
            $request->file('image'),
            $checkDirectory
        )->makeSizes()->get();

        $tmp = $this->_getTmpString();

        return view('avored-framework::product.upload-image')
            ->with('image', $image)
            ->with('tmp', $tmp);
    }
public function uploadImage(Request $request)
    {
        $image = $request->image;

        $tmpPath = str_split(strtolower(str_random(3)));
        $checkDirectory = 'uploads/catalog/images/' . implode('/', $tmpPath);

        $dbPath = $checkDirectory . '/' . $image->getClientOriginalName();
        $image = Image::upload(
            $request->file('image'),
            $checkDirectory
        )->makeSizes()->get();

        $tmp = $this->_getTmpString();

        return view('avored-framework::product.upload-image')
            ->with('image', $image)
            ->with('tmp', $tmp);
    }
public function uploadImage ( Request $ request ) { $ image = $ request -> image ; $ tmpPath = str_split ( strtolower ( str_random ( 3 ) ) ) ; $ checkDirectory = 'uploads/catalog/images/' . implode ( '/' , $ tmpPath ) ; $ dbPath = $ checkDirectory . '/' . $ image -> getClientOriginalName ( ) ; $ image = Image :: upload ( $ request -> file ( 'image' ) , $ checkDirectory ) -> makeSizes ( ) -> get ( ) ; $ tmp = $ this -> _getTmpString ( ) ; return view ( 'avored-framework::product.upload-image' ) -> with ( 'image' , $ image ) -> with ( 'tmp' , $ tmp ) ; }
upload image file and re sized it.

@param \Illuminate\Http\Request $request

@return \Illuminate\Http\Response
upload image file and re sized it .