dip
dip

Reputation: 13

PhpStorm does not recognize my models in the app folder

I am using Laravel 7. I use PhpStorm, and great fan of it.

I want to store all of my model files in a single folder named Models into app folder. I changed this line:

namespace App; -> namespace App/Models.

But PhpStorm is giving me an error. It doesn't recognize my folder:

Undefined constant 'Models'

How can I fix this?

the error photo

Upvotes: 0

Views: 123

Answers (1)

N69S
N69S

Reputation: 17206

Use the anti slash for namespace

namespace App\Models;

Upvotes: 3

Related Questions