php 在 Laravel 5.1 中打印所有正在运行的会话变量

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36795639/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 00:56:43  来源:igfitidea点击:

printing all running session variable in laravel 5.1

phplaravelframeworkslaravel-5.1

提问by prashant sutail

How do I print all running session variable in Laravel 5.1?

如何在 Laravel 5.1 中打印所有正在运行的会话变量?

I want to print all the running session variable. Currently I can retrieve single running session for given value but don't know the function for print all at one time with one function something like

我想打印所有正在运行的会话变量。目前,我可以检索给定值的单个正在运行的会话,但不知道一次使用一个函数进行打印的函数,例如

{{ Session::get(all)}}

回答by Alexey Mezenin

If you just want to see contents of session, try dd():

如果您只想查看会话的内容,请尝试dd()

dd(session()->all());

If not, just use this to get all info:

如果没有,只需使用它来获取所有信息:

$data = session()->all();

More on this here.

更多关于这里

回答by Harry Bosh

You can also use dd(Session::all());

你也可以使用 dd(Session::all());