Create a New Project with Spin Pro for Laravel
To get started, you'll need to install Spin. Follow the instructions we have in the documentation for the open source version of Spin.
Create a New Project
Once you have Docker and Spin installed, you can create a new project with a simple command.
You can change my-billion-dollar-idea
to whatever you want to name your project.
Create a new Laravel project called "my-billion-dollar-idea"
spin new laravel-pro my-billion-dollar-idea
You'll have a few prompts to complete during the project creation process. Follow the on-screen instructions to complete the process.
Accessing your development URLs
Before you can access the development URLs, you'll need to configure your hosts file.
Before attempting to start your project, make sure you have the following completed:
Once you have the above completed, you can start your local development services.
Start your local development services
cd my-billion-dollar-idea # Go into the project directory before running spin commands
spin up
When the services are up and running, you can access the following URLs:
- Web Server: https://laravel.dev.test
- Mailpit: https://mailpit.dev.test
- Vite: https://vite.dev.test
- Reverb: wss://reverb.dev.test
Bringing up Node services
By default, our project is configured to use yarn
. If you want to utilize hot module reloading with Vite, run the following command in a new terminal.
Start Vite
spin run node yarn dev
Connecting to your database
If you want to connect a database client to your database, you can follow our guide on connecting to your database.