Support the ongoing development of →
Requests Views
Last updated 2 years 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 2 years ago.

Sign in to participate in this thread!


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.

© 2024 - All rights reserved.