Laravel在更新到版本5.1.7后引发ReflectionException

时间:2015-07-13 05:37:34

标签: php laravel illuminate-container

我最近在Laravel 5.1.2旁边的博客上一直致力于我的投资组合开发。这一切都很好,直到我需要illuminate/html包。此外,在运行composer require illuminate/html命令之前,我运行composer update命令让所有库更新为更新版本。

但问题就在于此问题。由于升级到Laravel 5.1.7并安装了illuminate/html软件包,该项目已经变得混乱,并且一直在疯狂地狂欢

ReflectionException in Container.php line 736:
Class view does not exist

我没有丝毫的线索来源于此。

PS :我还更新了app.php文件,以包含与providers对应的相应aliasesilluminate/html

更新
这是我的控制器文件中的代码,如果它可能有任何帮助。

PagesController.php(我通过--plain artisan选项将其生成为普通存根)

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class PagesController extends Controller
{
    public function index()
    {
        return view('pages.home');
    }
}

ArticleController.php

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Article;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class ArticlesController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return Response
     */
    public function index()
    {
        $articles = Article::all();
        return view('blog.index', compact('articles'));
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return Response
     */
    public function create()
    {
        return view('blog.create');
    }

    /**
     * Store a newly created resource in storage.
     *
     * @return Response
     */
    public function store()
    {
        //
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return Response
     */
    public function show($id)
    {
        $article = Article::findOrFail($id);
        return view('blog.show', compact('article'));
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return Response
     */
    public function edit($id)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  int  $id
     * @return Response
     */
    public function update($id)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return Response
     */
    public function destroy($id)
    {
        //
    }
}

0 个答案:

没有答案