jovi
jovi

Reputation: 39

PhpStorm problem with recognizing namespaces, models and controllers

I have some problem with my PhpStorm (ver 2020.2). You can see on pictures, models, controllers and namespaces aren't recognized by PhpStorm, but application is working perfect.

Someone knows how to fix that problem in PhpStorm?

Namespaces

Controllers

Upvotes: 3

Views: 3169

Answers (2)

Pezhvak
Pezhvak

Reputation: 10868

For me, the solution was to close IDE from File > Close Project, then remove .idea folder rm -rf .idea from terminal, and finally reopening it fixed the issue.

Upvotes: 16

ml59
ml59

Reputation: 1641

You have to define the namespaces in the Settings
Go to Settings > Directories and edit the properties for each namespace enter image description here

On the Source Folders edit the prefix to be App\

enter image description here

Upvotes: 8

Related Questions