我正在添加html帮助器并面对这个波纹管问题。我找不到解决方案。
添加composer.json
"illuminate/html": "5.*"
并运行composer update
打开您的config / app.php
在“提供商”下添加
Illuminate\Html\HtmlServiceProvider::class,
添加'别名'
'Form' => Illuminate\Html\FormFacade::class,
'Html' => Illuminate\Html\HtmlFacade::class,
此处控制器文件
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class AdminAuthController extends Controller
{
public function index()
{
return view('admin-pages.login');
}
public function home()
{
return view('admin-pages.home');
}
}
这里有Composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"illuminate/html": "5.*",
"laravelcollective/html": "^5.1"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
}
}
感谢。
答案 0 :(得分:0)
return View::make('admin-pages.login');
答案 1 :(得分:0)
我按照以下两个步骤解决了同样的问题:
您也可以尝试。