A DDEV addon that sets up a Laravel backend with Next.js frontend in separate containers.
/backend
directory/frontend
directoryhttps://projectname.ddev.site
https://api.projectname.ddev.site
In a new directory, initialize ddev
ddev config --project-type=php
then get the addon from the addon registry
ddev get ddev/ddev-laravel-nextjs
or from a local location
ddev get /path/to/this/addon
After installation, bootstrap your project:
ddev start && ddev laravel-nextjs-setup
ddev artisan
- Run Laravel artisan commandsddev npm-frontend
- Run npm commands in frontend directoryddev laravel-nextjs-setup [--force]
- Bootstrap the project (use –force to overwrite existing)project/
├── backend/ # Laravel application
├── frontend/ # Next.js application
└── .ddev/ # DDEV configuration
ddev artisan migrate
to set up your databasehttps://projectname.ddev.site
https://api.projectname.ddev.site
db
host