app/Http/Controllers/ProductController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Product  $product
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(int $product)
    {
        try {
            Product::where('id', $product)->delete();
            return redirect('/product/list')
                ->with('status', 'product.success_delete_product')
                ->with('status_box', 'success')
                ;
        }
        catch (\Exception $e) {
            return redirect('/product/list')
                ->with('status', trans('product.error_delete_product'))
                ->with('status_box', 'danger')
                ;
        }
    }
public function destroy ( int $ product ) { try { Product :: where ( 'id' , $ product ) -> delete ( ) ; return redirect ( '/product/list' ) -> with ( 'status' , 'product.success_delete_product' ) -> with ( 'status_box' , 'success' ) ; } catch ( \ Exception $ e ) { return redirect ( '/product/list' ) -> with ( 'status' , trans ( 'product.error_delete_product' ) ) -> with ( 'status_box' , 'danger' ) ; } }
Remove the specified resource from storage.
Remove the specified resource from storage .