withInput()
and withErrors()
are reserved methods. Also the $errors
and $input
variables are made globally available through Laravel.
So, we can get the message from session in the controller and send those to view:
public function index()
{
$message = Session::get('message');
$users = [];
return View::make('users.index')->withUsers($users)->withMessage($message);
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community