So my view users contains a list of all registered users. It also features a button to delete a specific user, so I created a controller and a route
users/delete/[email protected]
in my controller, UsersController, I handle the delete action. The user gets deleted and I return to users with an success alert which states that the user was deleted.
$message = "User ".$user. " successfully deleted";
return View::make('users')->with(compact('message'));
which works, the alert is displayed. However, Chrome displays localhost:8000/users/delete/[email protected], which I can understand since I just 'make' (render) the users view within the users/delete/{email} route. Now that I'm really new to Laravel (and SO, so please be understanding) I wonder how to get Chrome to display localhost:8000/users and still show the message. I'm merely confused.
success alertand its message is passed to the view by $message. And thus, I don't know how to do this.