Which is the best way to display 'flash messages' in kohana v3?

后端 未结 5 1618
逝去的感伤
逝去的感伤 2021-02-04 13:52

I would like to know the best way to display flash messages in Kohana v3?

Some tutorials or examples would be helpful.

5条回答
  •  青春惊慌失措
    2021-02-04 14:29

    Do you mean like Kohana 2.x's flash session variables?

    The latest Kohana supports get_once() which is pretty similar to the old flash session variables.

    $session = Session::instance();
    
    $session->set('test', 'Hello, World!');
    
    // The session variable is returned and removed.
    $test = $session->get_once('test');
    

提交回复
热议问题