user3023925 user3023925 - 1 year ago 154
PHP Question

Laravel 5.1 nested controller class not found

The Laravel documentation clearly describes how to change your routes if you nest your controllers in folders. It seems REALLY simple, and yet I'm still getting an error. Here's the error:

"Class App\Http\Controllers\Input\InputController does not exist"

^That path looks 100% correct to me. What gives?

File Structure:






Route::get('input', 'Input\InputController@getInput');


<?php namespace App\Http\Controllers;

use Illuminate\Http\Response;

class InputController extends Controller
public function getInput()
return response()->view('1_input.input_form');

Thanks for any help!

Answer Source

Change Controller namespace from

namespace App\Http\Controllers


namespace App\Http\Controllers\Input
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download