laravel session_start() returning a 1

荒凉一梦 提交于 2019-12-24 06:34:07

问题


  • In laravel blade view i am doing {{session_start()}} and it is echoing out a why is that and how i fix it?
  • i heard that laravel has session management already built in and you dont need session_start(). is this true? because when i remove session_start() and try to return a session value it gives me error of undefined value. if it is true. how can i achieve this without a session start. source for this information.

    blade.php method outputting it's result to the form


回答1:


No need to write {{session_start()}}

From doc:

There are two primary ways of working with session data in Laravel: the global session helper and via a Request instance

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



来源:https://stackoverflow.com/questions/39960209/laravel-session-start-returning-a-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!