php - 找不到 Laravel 7.21 类 Illuminate\Support\Facades\Input

标签 php laravel laravel-7

找不到 Laravel 7.21 类 Illuminate\Support\Facades\Input

我在 app.php 中取了别名但是喜欢

Input' => Illuminate\Support\Facades\Input::class,

在Controller中这样写

use Illuminate\Support\Facades\Input;

这样访问

Input::all() , Input::get('name')

LARAVEL 7.21 版本中的任何更改 ???

最佳答案

基于 Laravel docs ,因为版本 6.x Input 已被删除。

The Input facade, which was primarily a duplicate of the Request facade, has been removed. If you are using the Input::get method, you should now call the Request::input method. All other calls to the Input facade may simply be updated to use the Request facade.

关于php - 找不到 Laravel 7.21 类 Illuminate\Support\Facades\Input,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63031318/

相关文章:

php - 通过 Composer 安装 Laravel

mysql - Eloquent 使用远程 MySQL DB 花费的时间太长

sql - 我想在订单交付 laravel 7 后减少产品数量

php - 为 Laravel 7 安装和配置 PhpRedis

php - 日期序列化后 Laravel 7 中的时区错误

使用 BCRYPT 的 PHP 散列添加不需要的字符

php - 以特定的 html 结构显示一些简单和可变产品的数据

php - 杀死后台 php 脚本(共享主机)

php - 显示记录时如何检查Field是否为空

laravel - if else 路由 laravel 中的条件