Support the ongoing development of Laravel.io →
Requests Views
Last updated 2 years ago.
0

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); 
}
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Debiprasad debiprasad Joined 18 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.