Where do I put Laravel 4 helper functions that can display flash messages?

后端 未结 8 876
孤街浪徒
孤街浪徒 2021-02-12 14:07

I\'ve written a simple display_messages() function that will search Session::get(\'errors\') for flash data and echo it to the screen.

Where do

8条回答
  •  难免孤独
    2021-02-12 14:39

    In L3, I would normally create a application/libraries/helpers.php file, and require_once() it in my application/start.php. Similar to how L3 has a laravel/helpers.php file.

    I'm assuming there is something similar you can do in L4.

    EDIT: Just looking at the source, app/start/local.php seems like it might be the place.

提交回复
热议问题