app/Http/Controllers/Admin/UserController.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 $user)
    {
        if (Gate::denies('delete-users')) {
            return redirect(route('admin.users.index'));
        }
        $user->roles()->detach();
        $user->delete();
        return redirect()->route('admin.users.index');
    }
public function destroy ( User $ user ) { if ( Gate :: denies ( 'delete-users' ) ) { return redirect ( route ( 'admin.users.index' ) ) ; } $ user -> roles ( ) -> detach ( ) ; $ user -> delete ( ) ; return redirect ( ) -> route ( 'admin.users.index' ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .
// dd($user);