Error with routeing with namespace in Laravel 5.3

0

Good, I have the following problem ... I am using laravel 5.3 and I want to group the controllers by Namespaces to have ordered, but it does not work for me if I follow the laravel 5.3 document ... surely something I need to set somewhere.

routes / web.php file:

    Route::group(['namespace' =>'Params'], function()
    {
        Route::get('ooss', 'OossController@index');
    });

app file / Http / Controllers / Params / OossController.php:

    namespace App\Http\Controllers;

    use Illuminate\Http\Request;

    class OossController extends Controller
    {

        public function __construct()
        {
            $this->middleware('auth');
        }

        public function index()
        {
            return 'Correcto!';
        }
    }

And it does not work for me. I also tried changing the first line of the OossController file to "namespace App \ Http \ Controllers \ Params;" and nothing. I hope you can help me.

    
asked by Emiliano Torres 13.12.2016 в 12:34
source

1 answer

1

Check if your files are like this, I'm using version v5.3.26 of laravel and it works fine:

    
answered by 13.12.2016 / 17:16
source