Getting Started with Laravel Go: Installation, SQLite Setup, and Customizing Inertia
Laravel for Go just dropped in beta, bringing Laravel’s batteries-included developer experience directly onto Go’s standard net/http package—complete with routing, migrations, queues, and Inertia + React out of the box.
Laravel for Go just dropped in beta, bringing Laravel’s batteries-included developer experience directly onto Go’s standard net/http package—complete with routing, migrations, queues, and Inertia + React out of the box.
I spent an evening spinning up my first Laravel Go app to see how it feels in practice. Here is a quick walkthrough of installing it, adding SQLite support alongside PostgreSQL, and customizing the React welcome page.
demo : https://letsgolara.onrender.com/
1. Installing the Laravel CLI & Scaffolding the App
Getting started only takes a couple of commands. First, install the new Laravel CLI:
curl -fsSL https://laravel.com/install.sh | sh
Then scaffold a new Go application:
laravel new sample-larago --go
cd sample-larago
The CLI downloads the starter app, installs npm dependencies (Inertia, React, TypeScript, Tailwind, and Vite Plus), generates an APP_KEY, and compiles the project in under 20 seconds:
✔ Starter app downloaded 3.14s
✔ npm dependencies installed 5.69s
✔ Application compiled 10.72s
✔ Application ready
2. Adding SQLite Support for Fast Local Development
Out of the box, a fresh Laravel Go app defaults to PostgreSQL. If you don't have a local Postgres server running and want zero-setup local development, you can add SQLite support—and even keep both drivers registered so you can use SQLite locally and Postgres in production.
In bootstrap/app.go, import the SQLite driver alongside Postgres and add it to the Drivers slice:
import (
// ...
"go.laravel.com/db"
"go.laravel.com/db/postgres"
"go.laravel.com/db/sqlite"
)
// Inside Options():
Drivers: []db.Driver{postgres.Driver, sqlite.Driver},
Next, pull in the SQLite driver dependencies:
go mod tidy
Update DATABASE_URL in .env:
DATABASE_URL=sqlite:storage/database.sqlite
Then run your migrations:
$ laravel migrate
◇ Migrating `0001_01_01_000000_create_users_table`...
◇ Migrating `0001_01_01_000001_create_cache_table`...
◇ Migrating `0001_01_01_000002_create_jobs_table`...
◆ 3 migrations ran.
That sets up users, sessions, database caching, and queued jobs inside storage/database.sqlite with zero extra infrastructure.
3. Routing & Customizing the Inertia Welcome Page
Start the development server with a single command:
laravel dev
This runs your Go server, queue worker, and Vite Plus together with automatic hot-reloading at [http://127.0.0.1:8000](http://127.0.0.1:8000).
Here is how a route flows from Go to React:
1. Define the route (routes/web.go):
func Web(route *routing.Router, cfg *config.Config) {
route.Get("/", welcome.Show)
}
2. Render an Inertia page from your Go handler (handlers/welcome/):
func Show(r *web.Request) *web.Response {
return inertia.Render("Welcome", inertia.Props{
"laravelVersion": laravel.Version,
})
}
3. Customize the React component (resources/js/pages/Welcome.tsx):
Because welcome.Show renders Welcome.tsx via Inertia, you get full TypeScript, Tailwind CSS, and instant hot-reloading. I swapped out the default minimal welcome view for a festive Christmas greeting featuring a custom SVG Go Gopher in a Santa hat and falling snow—while keeping the built-in WebGPU terrain canvas running in the background.
First Impressions
Historically, the Go community has endorsed a minimalist, standard-library-first culture. Laravel, on the other hand, has built a massive following around a "batteries-included" developer experience. While many Go purists will understandably prefer keeping things minimal, Laravel Go feels like a genuinely welcoming bridge for full-stack developers—especially those coming from frameworks like Django or Laravel PHP—who want Go’s performance without wiring everything up from scratch.
Have you tried Laravel Go yet? What are you planning to build with it?
Laravel #LaravelGo #Golang #WebDevelopment #InertiaJS #React #FullStack #SoftwareEngineering
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.