app/Http/Controllers/UserController.php
/*
      * Delete product image from folder after delete the product
      */
Delete product image from folder after delete the product
Delete product image from folder after delete the product
private function deleteProductImage( $image_path ){
        if( Storage::disk('uploads')->exists($image_path) == true )
        {
            if(Storage::disk('uploads')->delete($image_path));
            return true;
        }
        return false;
    }
private function deleteProductImage ( $ image_path ) { if ( Storage :: disk ( 'uploads' ) -> exists ( $ image_path ) == true ) { if ( Storage :: disk ( 'uploads' ) -> delete ( $ image_path ) ) ; return true ; } return false ; }
Delete product image from folder after delete the product
Delete product image from folder after delete the product