You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the doc
(These paragraphs have been removed in the document of Lumen 5.2)
Controllers & Namespaces
It is very important to note that we did not need to specify the full controller namespace when defining the controller route. We only defined the portion of the class name that comes after the App\Http\Controllers namespace "root". By default, the bootstrap/app.php file will load the routes.php file within a route group containing the root controller namespace.
If you choose to nest or organize your controllers using PHP namespaces deeper into the App\Http\Controllers directory, simply use the specific class name relative to the App\Http\Controllers root namespace. So, if your full controller class is App\Http\Controllers\Photos\AdminController, you would register a route like so:
According to the doc
(These paragraphs have been removed in the document of Lumen 5.2)
Everything is ok
These routes should be OK, too
But actually that will throw a ReflectionException. Lumen can't find my controller class.
After adding
'namespace' => 'App\Http\Controllers'
, the route group works.The text was updated successfully, but these errors were encountered: