title: How to use Flash messages in fat free framework?
body: <p>I am trying to make an small app so I have choosen Fat Free Framework. I need to show some messages based on successful or error. Suppose if I want to add an user then if successfully added show message that user has been added successfully or if not show error message that user cannot be added. I cannot figure it out. Here is my UsersController code</p>
  
  <pre><code> public function index(){
       $user = new User($this-&gt;db);
       $this-&gt;f3-&gt;set('users',$user-&gt;all());
       //there should be a way to decide if its error message or success and after display, 
       //it shouldn't be displayed again for the same task.
       //or may be it should be check in view file, I don't know where is the correct place
       // to do it
       $this-&gt;f3-&gt;set('page_head','User List');
       $this-&gt;f3-&gt;set('view','users/list.htm');
  </code></pre>
  
  <p>}</p>
  
  <pre><code>  public function create(){
      if($this-&gt;f3-&gt;exists('POST.create')){
      $user = new User($this-&gt;db);
      $user-&gt;add();
      //set session here to show in view file after redirect to list page
      $this-&gt;f3-&gt;reroute('/users');
     } else{
      $this-&gt;f3-&gt;set('page_head','Create User');
      $this-&gt;f3-&gt;set('view','users/create.htm');
     }
   }
  </code></pre>