laravel Permission(1) 安装html生成器laravelcollective/html

安装html生成器laravelcollective/html

composer require laravelcollective/html

时,报错

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for laravelcollective/html ^5.8 -> satisfiable by laravelcollective/html[v5.8.0].
    - Conclusion: remove laravel/framework v5.4.36
    - Conclusion: don't install laravel/framework v5.4.36
    - laravelcollective/html v5.8.0 requires illuminate/view 5.8.* -> satisfiable by illuminate/view[v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.3, v5.8.4, v5.8.8, v5.8.9].

解决:

       "laravel/framework": "5.8.*",

又报错:

In Route.php line 917:     Unable to prepare route [api/user] for serialization. Uses Closure.  

参考:https://blog.csdn.net/qq_39479575/article/details/78637743

 

③找到routes/api.php,暂时注释以下代码:

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

又报错:

In Route.php line 917: Unable to prepare route [/] for serialization. Uses Closure.  

参考:https://www.fujieace.com/laravel/route-2.html

1、创建laravel 项目时候。web.php 路由文件,里边有个默认的 welcome欢迎页;

Route::get('/', function()
{
    return veiw('welcome');
});

修改为

Route::get('/', 'HomeController@index');

 然后就OK了

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值