Last active
June 2, 2016 22:28
-
-
Save Sarav-S/3dc0c553bfd573dc6b6d6d24f24b3b6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Remove the specified resource from storage. | |
* | |
* @param App\User $user | |
* @return \Illuminate\Http\Response | |
*/ | |
public function destroy($user) | |
{ | |
if ($user->delete()) { | |
session()->flash('status', 'User deleted successfully'); | |
} else { | |
session()->flash('status', 'Unable to delete user. Please try again'); | |
} | |
return back(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment