1

I seem to be having an issue with PhpStorm and Laravel, where for some strange reason, every time that I manually create a new class file it uses the app for the beginning of the namespace - even though I've set the app name with artisan. When generating files via artisan - namespace is correct - it's just when I create files manually from within the PhpStorm.

I'm sure it's an easy fix - I just don't quite know where in the settings is the option to update it.

5
  • Check your Settings/Preferences | Project | Directories -- check folders that are marked as "Source". So far it sounds like root folder is marked as Source. Commented Nov 30, 2015 at 9:09
  • Also you can invoke "Detect PSR-0 Namespace Roots" i.imgur.com/T2r7Aqc.png Commented Nov 30, 2015 at 12:47
  • So how should I mark the app directory - as Source? Commented Nov 30, 2015 at 19:08
  • Right click on directory -> Mark directory As -> Sources Root Commented Dec 1, 2015 at 6:29
  • Thankx @fuvinan - could you post it as and answer so that I can accept it? Commented Dec 1, 2015 at 9:25

1 Answer 1

2

Right click on directory -> Mark directory As -> Sources Root

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.