2

I'm working on a Laravel project using Laradock. I do not have PHP installed locally. How can I get IntelliSense for PHP and Laravel to work in VSCode while using Laradock?

1 Answer 1

1

From your local machine:

  1. Install the Dev Containers Extension

  2. Using Dev Containers, attach to your Laravel Workspace Container. A new VSCode window will open.

From your workspace container:

  1. Ensure that you have PHP intellisense and Laravel extensions installed within the container. You'll have to go to the extensions tab again and you will see "Install in Container <container name>".

    screenshot of VS Code extensions tab with "Laravel" searched and an "Install in Container ..." prompt showing in the bottom right corner of the Laravel extension

  2. Set your php executable path. On a Mac you need to go to Code > Settings > Settings, and select the remote container tab.

    Then add
    "php.validate.executablePath": "/usr/bin/php"

    screenshot of macOS Settings menus for VS Code

screenshot of remote container tab in VS Code

screenshot of the settings file with the newly added line

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.