app/Http/Controllers/ProductController.php
/**
     * Remove the specified resource from storage.
     *
     * @param Product $product
     * @return JsonResponse
     */
Remove the specified resource from storage.
@param Product $product
@return JsonResponse
Remove the specified resource from storage . @param Product $product @return JsonResponse
public function destroy(Product $product)
    {
        $product_id = $product->id;
        if ($product->delete())
        {
            File::delete($product_id);
            return Helper::response_with_data(null, false);
        }
        return Helper::response_with_data(null, true);
    }
public function destroy ( Product $ product ) { $ product_id = $ product -> id ; if ( $ product -> delete ( ) ) { File :: delete ( $ product_id ) ; return Helper :: response_with_data ( null , false ) ; } return Helper :: response_with_data ( null , true ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .