How to Run
- Install Devbox
-
Create a new Laravel App by running
devbox create --template laravel. This will create a new Laravel project in your current directory. -
Start your MariaDB and Redis services by running
devbox services up.- This step will also create an empty MariaDB Data Directory and initialize your database with the default settings
- This will also start the php-fpm service for serving your PHP project over fcgi. Learn more about PHP-FPM
-
Create the laravel database by running
devbox run db:create, and then run Laravel’s initial migrations usingdevbox run db:migrate -
You can now start the artisan server by running
devbox run serve:dev. This will start the server on port 8000, which you can access atlocalhost:8000 -
If you’re using Laravel on Devbox Cloud, you can test the app by appending
/port/8000to your Devbox Cloud URL - For more details on building and developing your Laravel project, visit the Laravel Docs
How to Recreate this Example
Creating the Laravel Project
-
Create a new project with
devbox init -
Add the packages using the command below. Installing the packages with
devbox addwill ensure that the plugins are activated: