1

Every time when I code on Laravel framework I get those IDE warnings.. like it didn't find some method or class like Eloquent Class.

I searched on google and I found this plugin but it didn't help, actually I didn't see any difference.

Is it even possible to integrate between Laravel and PhpStorm?

4
  • 2
    check this out: github.com/barryvdh/laravel-ide-helper Commented Jun 24, 2015 at 18:52
  • Also: confluence.jetbrains.com/display/PhpStorm/… Commented Jun 24, 2015 at 19:04
  • PhpStorm doesn't know about Laravel's facade structure yet. That's why you get those undefined class errors. Commented Jun 24, 2015 at 19:13
  • There is a good laravel plugin for PhpStorm that does know about the facade structure. Open up plugins and install it. Commented Jun 24, 2015 at 19:53

1 Answer 1

1

The video in the accepted answer explains it just fine, here is my text version:

on the command line type and execute:

composer require barryvdh/laravel-ide-helper

next type and execute:

php artisan ide-helper:generate

This will generate a file called _ide_helper.php that will help PHPStorm/IntelliJ recognize the facades (add this file to your .gitignore as it is not part of your code).

Go back to your PHPStorm or IntelliJ and you will see that the facades are recognized and autocomplete is working!

Source code: https://github.com/barryvdh/laravel-ide-helper

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.