samedi 11 août 2018

laravel can't find controller in subfolder

I'm trying to put the HomeController in a folder called Front. This is Laravel 5.6

So the path to my controller is Controllers/Front/HomeController.php

namespace App\Http\Controllers\Front;

use Illuminate\Http\Request;

class HomeController extends Controller
    {

Then in my routes I have this:

Route::get('/', 'HomeController@index');

As suggested in this Stackoverflow: Laravel Controller Subfolder routing I have tried to add the controller to the subfolder, then run composer dump-autoload yet it doesnt work.

Any suggestions?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire