“调用未定义的函数str_slug()"在Laravel 6.0中 [英] "Call to undefined function str_slug()" in Laravel 6.0

查看:672
本文介绍了“调用未定义的函数str_slug()"在Laravel 6.0中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将laravel 5.8项目升级到6.0.它已成功升级,但是当我尝试运行该项目或将另一个软件包安装到我的项目时,它给我的错误称为session.php中的调用未定义的函数str_slug()".我不知道为什么...

I've upgraded my laravel 5.8 project to 6.0. It has upgraded successfully but when I'm trying to run the project or installing another package to my project it is giving me error named as "Call to undefined function str_slug()" in session.php. I don't know why....

Call to undefined function str_slug()

推荐答案

如果您已完成升级指南,则必须知道

If you have gone through the upgrade guide then you must know that

字符串数组

帮助程序已从Core Framework中删除

Helpers are removed from Core Framework

https://laravel.com/docs/6.0/upgrade#helpers

https://github.com/laravel/framework/blob/5.8/src/Illuminate/Support/helpers.php#L1071

因此,如果您仍然需要使用帮助程序,请安装该程序包

So if if You need to still use the helper install the package

composer require laravel/helpers

,所有帮助者都移至该程序包

and all the helpers are moved to this package

这篇关于“调用未定义的函数str_slug()"在Laravel 6.0中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆