Support the ongoing development of →
Requests Views
Last updated 1 year ago.

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 1 year ago.

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

Debiprasad debiprasad Joined 18 Jun 2014


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

Your logo here?

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

© 2023 - All rights reserved.