我已经将Laravel从5.6升级到6.0.以前,默认帮助器功能在控制器上运行良好,但现在显示为"undefined".在我的控制器中,我使用了以下内容.
$filename = str_random(12);
我收到以下错误.
message: "Call to undefined function App\Http\Controllers\str_random()"
I have also used the random()
function, and it's saying the same thing.
有人能指导我做什么吗?
I have run commands like:
composer dump-autoload
But I get the same error.