Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Route namespace looks at wrong class path #4

Open
elynnaie opened this issue Nov 29, 2016 · 2 comments
Open

Route namespace looks at wrong class path #4

elynnaie opened this issue Nov 29, 2016 · 2 comments

Comments

@elynnaie
Copy link
Contributor

It seems that the command does not work correctly if I have a group with a namespace. For example:

Route::group(['prefix' => 'acme', 'namespace' => 'Acme'], function () {
    Route::controller('abc', 'AbcController');
}

This throws the error:

  [ReflectionException]                                 
  Class App\Http\Controllers\AbcController does not exist

However, it should be looking at App\Http\Controllers\Acme\AbcController, which does exist. If I change my routes to:

Route::group(['prefix' => 'acme', 'namespace' => 'Acme'], function () {
    Route::controller('abc', 'Acme\AbcController');
}

then it works, so I have a workaround, but this means changing all my routes to include the namespace and then presumably fixing them after running the command.

@EdgarsK
Copy link

EdgarsK commented Jan 2, 2017

+1

1 similar comment
@szamanr
Copy link

szamanr commented Feb 21, 2018

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants