0

I'd been working on my portfolio development with a blog alongside on Laravel 5.1.2 lately. It all was working fine till the moment I needed the illuminate/html package. Also, prior to running the composer require illuminate/html command, I ran the composer update command to let all the libraries update to their newer versions.

But that's where the problem crept in. Since, the upgrade to Laravel 5.1.7 and the installation of the illuminate/html package, the project has gone haywire and has been throwing barking mad

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

And I haven't the slightest clue where this is arising from.

PS: I have also updated the app.php file to include the respective providers and aliases corresponding to illuminate/html.

Update
Here's the code from my controller files if it might be of any help.

PagesController.php (I generated it as a plain stub via the --plain artisan option)

<?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)
    {
        //
    }
}
ikartik90
  • 2,695
  • 6
  • 26
  • 38
  • Windows or Linux? Could be a problem with case sensitivity. I.e. `View` instead of `view`. Maybe? – Sverri M. Olsen Jul 13 '15 at 05:47
  • I'm running it on a Windows machine. Also, I'm not sure which `view` class it might be referring to. One thing's for sure though, that it is case-sensitive. – ikartik90 Jul 13 '15 at 05:55
  • have you add use view in your controller file? – Jigs Virani Jul 13 '15 at 06:36
  • The only places I've used `view`s in my controller files is where I have returned the control to the view, as in, `return view('folder.view', compact('variable'));` – ikartik90 Jul 13 '15 at 07:15
  • 1
    I created a new application and replicated all the files in the above application into the new one. And it worked like magic. Now the only thing I wish to figure is where did this go wrong. – ikartik90 Jul 13 '15 at 09:17

0 Answers0