Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Messages class - DOCS
  • Hi, please can you give me a doc link for this class? because I used it but can't see my error, success..etc messages  once i redirect here is my code:

    <?php
    foreach (array('error', 'warning', 'success', 'info') as $type)
    {
       foreach(\Messages::instance()->get($type) as $message)
       {
           echo '<div class="',$message['type'],'-box">',$message['body'],'</div>',"\n";
       }
    }
    \Messages::reset();
    ?>

    in my controller for example I used this line: 
    \Messages::success(sprintf(__('login.provider-linked'), ucfirst($provider)));

    but nothing has been shown.
  • HarroHarro
    Accepted Answer
    There is no doc link for that, it's a class we use in our application framework (which is where the example in the docs comes from).

    So you either have to implement your own messaging solution (most apps do), or use the Message class (and Message instance class) from here: https://github.com/fuel/depot/tree/1.0/develop/fuel/app/classes which is an early version but should to the trick for basic stuff...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion