Laravel session_start () returns 1

  • In laravel view mode, I do {{session_start()}} and it repeats, why is it like this and how do I fix it?
  • I heard that laravel already has session management and you don't need session_start (). It's true? because when I delete session_start () and try to return the session value, it gives me an undefined value error. if it's true. how can i achieve this without starting a session. source for this information.

    blade.php method that outputs the result to the form

+1
source share
1 answer

No need to write {{session_start ()}}

From the doc doc:

There are two main ways to work with session data in Laravel: the global session assistant and the query instance.

https://laravel.com/docs/5.1/session

+1
source

Source: https://habr.com/ru/post/1258025/


All Articles