app/Http/Controllers/Student/ChildrenController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\User  $user
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(User $child)
    {
        if (Gate::denies('manage-add-student')) return redirect() -> route('student.children.index');
        $child -> roles()->detach();
        $child -> subjects() -> detach();
        $child->delete();
        session() -> flash('success', "You have modified Children!");
        return redirect() -> route('student.children.index');
    }
public function destroy ( User $ child ) { if ( Gate :: denies ( 'manage-add-student' ) ) return redirect ( ) -> route ( 'student.children.index' ) ; $ child -> roles ( ) -> detach ( ) ; $ child -> subjects ( ) -> detach ( ) ; $ child -> delete ( ) ; session ( ) -> flash ( 'success' , " You have modified Children! " ) ; return redirect ( ) -> route ( 'student.children.index' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .