PhpStorm Composer and Laravel Not Working (Autocomplete, Undefined Class)

Share
Workaround available Windows, macOS, Linux Updated November 14, 2026Based on 3 user reportsHow we research

Quick answer

Missing Laravel or Composer autocomplete is usually an unconfigured Composer, an unindexed vendor folder or missing helper stubs. Configure Composer and let vendor index.

Most likely fix: Configure Composer

How to fix it

Try these in order — the most common fix is first.

  1. 1. Configure Composer

    1. Open Settings | PHP | Composer
    2. Set the path to composer.json and the executable
    3. Run Tools | Composer | Install
    Did this fix it?
  2. 2. Make sure vendor is indexed

    1. Check vendor is not marked Excluded
    2. Run composer install and wait for indexing
    Did this fix it?
  3. 3. Add helpers for facades

    1. Use a Laravel helper package such as barryvdh/laravel-ide-helper to generate stubs
    2. Install the PhpStorm Laravel plugin if you need Laravel-aware features
    Did this fix it?

Symptoms

Undefined class or method warnings on Laravel code, Composer actions greyed out, or autocomplete missing for facades.

Why it happens

  • composer.json not configured under Settings | PHP | Composer
  • vendor folder excluded or not yet installed
  • Facade methods are dynamic so the IDE cannot resolve them without helper stubs
  • Interpreter not configured

This guide also covers

  • phpstorm laravel autocomplete not working
  • phpstorm composer not working
  • phpstorm undefined class laravel

Still not working?

If PhpStorm keeps failing, you're not alone. See every PhpStorm problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

Other PhpStorm errors

All 10 PhpStorm errors and fixes →