我有点卡在这里,每次加载视图时都无法使FormFacade工作,这会引发错误。
ErrorException (E_ERROR)
Class 'GeneaLabs\LaravelCasts\FormFacade' not found (View:
C:\inetpub\wwwroot\Laravel\howlong\resources\views\index.blade.php)
Previous exceptions
Class 'GeneaLabs\LaravelCasts\FormFacade' not found (0)
我添加了
'providers' => [
Collective\Html\HtmlServiceProvider::class,
],
还有
'aliases' => [
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
],
在我的composer.json中,
"laravelcollective/html": "^5.7"
我已经跑了
composer update
php artisan config:clear
php artisan cache:clear
还是没有运气,我在做什么错了?
这是Laravel 5.7.14
我的完整composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.1.3",
"askedio/laravel5-profanity-filter": "^1.10",
"fideloper/proxy": "^4.0",
"genealabs/laravel-casts": "^0.8.2",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^5.7"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}
答案 0 :(得分:0)
路径 GeneaLabs \ LaravelCasts \ FormFacade 错误,应该是 GeneaLabs \ LaravelCasts \ Facades \ FormFacade ,属于g enealabs / laravel- 包。您在任何地方使用此软件包吗?
请更正以下内容,
GeneaLabs \ LaravelCasts \ Facades \ FormFacade