0

I recently started using PhpStorm though I don't think the problem is only about this specific IDE.

It provides a great help with the auto-complete feature but there's a problem with the interfaces. I used the exactly same interface structure with the one used in this video. Codes are working perfectly but IDE cannot understand that UserRepositoryInterface is currently implemented by EloquentUserRepository which is defined in the relevant service provider as App::bind('UserRepositoryInterface', 'EloquentUserRepository')

I searched for a little while but couldn't find any solution. How can I tell PhpStorm that when I write $this->table-> in my controller, it should auto-complete from my User.php model?

BTW, I'm using this package: https://github.com/barryvdh/laravel-ide-helper

Hkan
  • 3,243
  • 2
  • 22
  • 27
  • Blade template engine is not fully supported by PhpStorm (work is in progress): http://youtrack.jetbrains.com/issue/WI-14172 . Vote for the existing issue. – Kootli Apr 15 '14 at 09:17
  • I never mentioned Blade or anything related to Blade in my question. – Hkan Apr 16 '14 at 10:34

1 Answers1

0

Try renaming class User to class MyUser (for example) you should get your auto-complete back. I am experiencing the same issue right now and it came down to IDEA (or phpStorm) getting horribly confused by dealing with all of Symfony's namespaces.

Renaming a class just because the IDE can't deal with it is obviously not the ideal way to go, but as we're forced to use an IDE helper for this anyway, we might as well.

PS: Don't forget to set your 'model' => 'MyUser' in your app/config/auth.php!

baeda
  • 189
  • 12