app/Http/Controllers/UserController.php
/*
     * Move uploaded product to products directory
     * @return boolean
     * @params FILE, code
     */
Move uploaded product to products directory
@return boolean
@params FILE, code
Move uploaded product to products directory @return boolean @params FILE code
private function moveProductImage( $file ){
        $image_name = $file->getClientOriginalName();
        $extension = explode('.', $image_name);
        $extension = end($extension);
        $filter_name = Uuid::uuid(). '.' . $extension;
        if(Storage::disk('uploads')->put($filter_name, file_get_contents($file))) {
            return  $filter_name;
        }
        return false;
    }
private function moveProductImage ( $ file ) { $ image_name = $ file -> getClientOriginalName ( ) ; $ extension = explode ( '.' , $ image_name ) ; $ extension = end ( $ extension ) ; $ filter_name = Uuid :: uuid ( ) . '.' . $ extension ; if ( Storage :: disk ( 'uploads' ) -> put ( $ filter_name , file_get_contents ( $ file ) ) ) { return $ filter_name ; } return false ; }
Move uploaded product to products directory
 @return boolean
 @params FILE, code
Move uploaded product to products directory @return boolean @params FILE code