Development
Introduction
Day-to-day work on a Laravel for Go application centers on a few tools: laravel dev for running your server, queue worker, and Vite together, the Go toolchain for building and testing your backend, and the AI coding agents that can implement and verify features alongside you.
This guide covers your local development workflow and how to get the most out of the agent instructions, skills, and cloud-agent workflows included in every new application.
Running your application locally
When you work on an application locally, you usually want the web server, a queue worker, and Vite's asset server running at the same time. Start all three together with laravel dev:
1laravel dev1laravel dev
While laravel dev runs, saving a .go file, go.mod, go.sum, or .env rebuilds and restarts your server and queue worker, and refreshes your browser once the server is ready. Frontend edits in resources/ hot-reload through Vite, and template edits in resources/views/ reload the page automatically.
If you want to run a single process on its own, such as keeping Vite running while you restart the server by hand, use the individual scripts in package.json:
1npm run dev:server2npm run dev:queue3npm run dev:vite1npm run dev:server2npm run dev:queue3npm run dev:vite
Run your application's console commands through the laravel CLI from any directory inside your project, such as laravel migrate or laravel route:list. In environments where the laravel CLI isn't installed, run commands through Go instead:
1go run . route:list1go run . route:list
WebSockets
If your application broadcasts events over WebSockets, run the local Reverb server in another terminal alongside laravel dev:
1laravel reverb:start1laravel reverb:start
To learn more about configuring the local server, check out the WebSockets guide.
Verification commands
Before opening a pull request or handing off a change, run your test suite, Go checks, and frontend checks to catch errors early:
1go test ./...2gofmt -w .3go vet ./...4npm run types:check5npm run check1go test ./...2gofmt -w .3go vet ./...4npm run types:check5npm run check
To focus on a single package or test while you iterate, pass a package path and -run filter to Go, such as go test ./tests/feature -run TestPosts. Go caches passing test runs when your Go files haven't changed, so pass -count=1 when you want to force every test to run again after changing .env, environment variables, or external state:
1go test -count=1 ./...1go test -count=1 ./...
To automatically fix frontend lint and formatting issues, run npm run check:fix. To learn more about writing feature tests and configuring your test database, check out the testing guide.
Developing with AI agents
Laravel's predictable package layout, explicit wiring, and fast test feedback loops give AI coding agents the context they need to write idiomatic code. Every new Laravel application includes project instructions and focused agent skills that tell an agent where packages belong, how your application is tested, and where to read the exact documentation for your installed framework version.
Project instructions and skills
At the root of every new application, you'll find two instruction files and a .agents/skills/ directory:
AGENTS.mdgives coding agents a concise overview of your application's layout, verification commands, and conventions, including resource-oriented handler packages, testing practices, and where new packages belong.CLAUDE.mdimports@AGENTS.md, so tools that look for either file read the same instructions..agents/skills/holds seven Agent Skills that agents load on demand when working on specific areas of your application:writing-laravel-go-appshelps agents locate the installed framework docs, organize packages by domain, write lean CRUD handler packages and sub-resources, extract reusable action functions inactions/, and follow Laravel for Go idioms.database-and-modelscovers model structs, relationship tags and eager loading, forward-only migrations registered inmigrations.All, framework table helpers, and factories indatabase/factories/.validation-and-inputcovers typed body validation (r.Validateandr.Bind), query structs (r.Queryandr.QueryInto),validation.Forwithrule.Field,model.Unique/model.Exists, and custom rules.auth-and-authorizationcoversauth.Session[models.User],models.CurrentUser, named auth routes,auth.Abilitypolicy functions, andauth.Authorizechecks.queues-and-workflowscovers choosing between background tasks, queued jobs, durable workflows, and events/listeners, explicit registration injobs.All/workflows.All/listeners.All, deterministic workflow steps, and thin scheduled callbacks.testing-laravel-go-appsguides agents through writing HTTP feature tests undertests/feature/, usinglaraveltest.RefreshDatabaseand factories, faking subsystems, and testing jobs, listeners, and scheduled logic directly withclient.Context().inertia-frontendguides agents through building Inertia v3, React, TypeScript, and Tailwind CSS v4 pages, forms, shared props, and Vite Plus assets.
Update AGENTS.md and .agents/skills/ as your application grows. Add notes about your domain terminology, custom services in services/services.go, and internal conventions so every agent session follows your team's patterns.
Version-matched framework documentation
Because Laravel for Go evolves quickly, an AI agent that relies on memorized training data or web searches can guess outdated signatures or confuse APIs from other frameworks. To prevent that, the go.laravel.com module bundles the complete Markdown guides for the exact version your application depends on.
The writing-laravel-go-apps skill includes a small helper script that prints the path to the installed documentation directory for your current go.mod:
1.agents/skills/writing-laravel-go-apps/scripts/docs-path.sh1.agents/skills/writing-laravel-go-apps/scripts/docs-path.sh
Agents run this script to read <docs>/documentation.md and open the exact guide for the feature they're working on before writing code. You can run the script yourself anytime you want to search or browse the offline guides that match your application's installed version.
Developing with cloud agents
Alongside local development, Laravel for Go pairs well with cloud coding agents such as Amp, Cursor, and Devin. Running several cloud agents in parallel lets you move through features, refactors, and bug fixes far faster than working serially on one branch at a time:
- Parallel progress across features. You can assign independent tasks to separate cloud agents at once, such as adding a resource endpoint, writing a background job, and updating an Inertia page, then review pull requests as they finish.
- Fast verification before you review. Go's fast compilation,
go vet, TypeScript's type checker, and Laravel's isolated database feature tests give remote agents clear, objective feedback. Paired withAGENTS.md,.agents/skills/, and the bundled version-matched docs, a cloud agent can implement a feature, rungo test ./...andnpm run check, fix any issues on its own, and open a ready-to-review pull request. - Live review on every pull request. When you host your application on Laravel Cloud, preview environments build and deploy every pull request automatically. You can test an agent's work in a real browser at a live preview URL before merging, without even checking out the branch locally.
To get the most out of parallel cloud agents, keep your tests fast and self-contained using RefreshDatabase and subsystem fakes, keep AGENTS.md current as your architecture grows, and split features into clear, independent tasks that agents can verify end to end.