dimanche 31 janvier 2016

Class 'App\Http\Controllers\Controller' not found - Laravel 5.2

Hello i am new here but already checked all solutions about my problem here and still didn't fix it :)

I want to create simple app with tutorial in Laravel 5.2, and i can't make my controller to work.

I named my app "test" and here is a code:

PagesController.php :

<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;

class PagesController extends Controller
{
    public function getAbout(){
         return view('about');   
    }
}

routes.php:

Route::get('about', [
    'as' => 'about',
    'uses' => 'PagesController@getAbout'
]);

And Controller.php (default):

namespace test\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;
}

Guys do you see any problem here? My friend has got exactly the same problem... I am sure all files are in correct folders.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire