0

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

1
  • 4
    use App\Models not App/Models Commented Sep 14, 2020 at 9:09

1 Answer 1

3

Use the anti slash for namespace

namespace App\Models;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.