/php-laravel-codespaces-devcontainer

CodeSpaces for Laravel/PHP applications, includes necessary .devcontainer files to get started.

Primary LanguageDockerfileMIT LicenseMIT

PHP-Laravel-CodeSpaces-DevContainer

This repo provides the .devcontainer files needed to start a CodeSpace for Laravel on GitHub.

Instructions

  1. Copy .devcontainer folder to your project root
  2. (Optional) Copy init_codespace.sh to project root
  3. Push to repo
  4. Access repo GitHub page, open in CodeSpaces
  5. Container should build and IDE should open ready for use
  6. (Optional) Run init_codespace.sh to create .env and run DB migrations/seeds
    . ./init_codespace.sh

Notes

  • CodeSpaces is currently in Closed Beta, you need access to use .devcontainer files
  • Includes the following PHP extensions, you can add your own by adjusting the DOCKERFILE
    • bcmath mysqli pdo pdo_mysql zip
  • To access your site you need to run the following:
    php artisan serve

Credits

https://github.com/PMessinezis/vscode.laravel.devcontainer/blob/master/Dockerfile