app/Http/Controllers/Admin/ReceivedPaymentsController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Order  $order
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Order $order)
    {
        if (Gate::denies('manage-payments'))
        {
            return redirect()->route('admin.receivedpayments.index');
        }
        if ($order->delete())
        {
            session()->flash('success', 'You have modified the order!');
        } else {
            session()->flash('error', 'There is an error deleting the order');
        }
        return redirect()->route('admin.receivedpayments.index');
    }
public function destroy ( Order $ order ) { if ( Gate :: denies ( 'manage-payments' ) ) { return redirect ( ) -> route ( 'admin.receivedpayments.index' ) ; } if ( $ order -> delete ( ) ) { session ( ) -> flash ( 'success' , 'You have modified the order!' ) ; } else { session ( ) -> flash ( 'error' , 'There is an error deleting the order' ) ; } return redirect ( ) -> route ( 'admin.receivedpayments.index' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .