Wednesday, March 15, 2017

Laravel with PhpStorm fatal error

I have a newly created project using Laravel. When I try to open it in my browser, it is giving me the following error.

Fatal error: Class 'Illuminate\Routing\Controller' not found in C:\xampp\htdocs\Laravel-Tutorial\app\Http\Controllers\Controller.php on line 11

My controller code is as below

<?php

namespace Tutorial\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}

I have not change anything apart from the namespace name that was changed using the command below.

artisan app:name Tutorial

When I type localhost:63342 which uses the built in server port, I'm getting 404 Not Found.

When I type localhost:63342/Laravel-Tutorial. I getting 404 Not Found, Index file doesn't exist



via active92

Advertisement