Beispiel #1
0
    public function destroy($id)
    {
        //Message that's returned
        $msg = '<div class="alert alert-warning alert-dismissible col-md-12" role="alert">
					  <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
					 	User Deleted!
				</div>';
        //Delete userinfo with that user's data
        Userinfo::deleteUser($id);
        //Delete user
        User::findOrFail($id);
        User::destroy($id);
        return Redirect::to('admin')->with('message', $msg);
    }