Laravel 检查输入 isset
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26550009/
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
Laravel checking input isset
提问by Yada
Laravel Input helper has
Laravel 输入助手有
Input::has('debug')
输入::已('调试')
My problem is that I often use query parameter without the value such has http://example.com?debug
我的问题是我经常使用没有http://example.com?debug这样的值的查询参数
The problem is that Input::has('debug') will return false in this case because there is no value. ie. debug=1
问题是 Input::has('debug') 在这种情况下将返回 false,因为没有值。IE。调试=1
So I end up having to use isset($_GET['debug']).
所以我最终不得不使用isset($_GET['debug']).
Is there a laravel way to check whether the input isset?
有没有laravel方法来检查输入是否为isset?

