When I type Comment
and press enter for the suggested class, I get \App\Models\Comment
. Instead. I want to explicitly import it i.e. use App\Models\Comment
.
CodePudding user response:
Since the auto import works in namespaced context (in a controller or model classes) then it must be that specific context setting.
Settings (Preferences on macOS)
Editor | General | Auto Import
- Make sure that
PHP | Enable auto-import in file scope
option is enabled.