- Laravel Version: 5.7.1
- PHP Version: 7.2
- Database Driver & Version: MySQL 5.6
Description:
The Router class is appending the group namespace to a route which has been declared as a single action controller using fully qualified class name.
The problem is that a fully qualified class name doesn't starts with \, so the code in prependGroupNamespace will concatenate the namespace to it.
App\Http\Controllers\InvokableController::class will evaluate to App\Http\Controllers\App\Http\Controllers\Invokable
Steps To Reproduce:
Create an invokable controller: php artisan make:controller InvokableController --invoke
Declare a route in your web.php file:
Route::get('invokable', \App\Http\Controllers\InvokableController::class);