app/Http/Controllers/Admin/AssignmentsController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Assignment  $assignment
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Assignment $assignment)
    {
        if (Gate::denies('manage-students')) {
            session()->flash('error', "You don't have enough permission.");
            return redirect()->route('admin.assignments.index');
        }
        $assignment->delete();
        session() -> flash('success', "Student assignment details has been successfully deleted.");
        return redirect()->route('admin.assignments.index');
    }
public function destroy ( Assignment $ assignment ) { if ( Gate :: denies ( 'manage-students' ) ) { session ( ) -> flash ( 'error' , " You don't have enough permission. " ) ; return redirect ( ) -> route ( 'admin.assignments.index' ) ; } $ assignment -> delete ( ) ; session ( ) -> flash ( 'success' , " Student assignment details has been successfully deleted. " ) ; return redirect ( ) -> route ( 'admin.assignments.index' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .