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

后端 未结 8 872
孤街浪徒
孤街浪徒 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:35

    open root_folder/vendor/laravel/framework/src/Illuminate/Support/helpers.php

    and you can add your function

    if ( ! function_exists('display_messages'))
    {
        function display_messages()
        {
            return ...
        }
    }
    

提交回复
热议问题