-3

I Create an application in Laravel Framework & it was working fine. Now after some modification when I want to affiche message Error dosent fonction .

<p class="alter-danger">
                <?php
                $message= Session::get(message);
                if($message){
                    echo $message;
                    Session::put('message',Null);
                }
                ?>
                </p>
yayabouda
  • 51
  • 1
  • 1
  • 9
  • Quotes are missing: `Session::get(message);` therefore the interpreter assumes the string is a constant and looks for it but it can't find that constant hence the error message saying "*assumed 'message'*". – Script47 Aug 17 '18 at 09:23
  • Possible duplicate of [What does the PHP error message "Notice: Use of undefined constant" mean?](https://stackoverflow.com/questions/2941169/what-does-the-php-error-message-notice-use-of-undefined-constant-mean) – Script47 Aug 17 '18 at 09:36

1 Answers1

4

change the line $message= Session::get(message); to $message= Session::get('message');

Mayuri Pansuriya
  • 934
  • 6
  • 13