app/Http/Controllers/Admin/InvoicesController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Invoice  $studentInvoice
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Invoice $invoice)
    {
        if (Gate::denies('manage-payments')) {
            return redirect()->route('admin.invoices.index');
        }
        $invoice->delete();
        return redirect()->route('admin.invoices.index');
    }
public function destroy ( Invoice $ invoice ) { if ( Gate :: denies ( 'manage-payments' ) ) { return redirect ( ) -> route ( 'admin.invoices.index' ) ; } $ invoice -> delete ( ) ; return redirect ( ) -> route ( 'admin.invoices.index' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .