Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

r2get's avatar
Level 1

Using PHP storm -- autocomplete route namespace does not work

Hi,

I use PHP storm. In my routes file i use the autofill option to get the namespace of a method on a controller like this

Route::get('/home/dashboard', 'App\Http\Controllers\Backend\Home\DashboardController@index')->name('dashboard');

The problem is that this namespace that is generated errors in: ReflectionException (-1) Class App\Http\Controllers\App\Http\Controllers\Backend\Home\DashboardController does not exist

when i manualy change it to Backend\Home\DashboardController@index

then it does work.... in my controller i have the namespace namespace App\Http\Controllers\Backend\Home;

why does the full path dont work? and how can i make it work,, or make phpstorm autofill with the correct namespace

0 likes
3 replies
r2get's avatar
Level 1

Yes i think this is the plugin,, where can i change this setting?

bashy's avatar

Not sure. Are there any settings for the plugin?

Please or to participate in this conversation.