Dev.to WebDev 🛠 Dev 👁 0 📖 3 min read

ToGO for Laravel developers: the artisan commands you know, in Go

I have written PHP and Laravel for more than ten years, including 60+ Filament plugins under TomatoPHP. When I started building services in Go, what I missed was not the language. It was php artisan make:.... ToGO is bu

I have written PHP and Laravel for more than ten years, including 60+ Filament plugins under TomatoPHP. When I started building services in Go, what I missed was not the language. It was php artisan make:....

ToGO is built so a Laravel developer feels at home on day one. Here is the translation table I wish I had.

The command map

Laravel ToGO
laravel new app togo new app
php artisan make:model Post -mcr togo make:resource Post title:string body:text
php artisan make:model togo make:model
php artisan make:controller togo make:controller
php artisan migrate togo migrate
php artisan db:seed togo seed
php artisan serve + npm run dev togo dev / togo serve
composer require vendor/package togo install togo-framework/<plugin>
custom artisan command togo make:plugin or any togo-<cmd> binary on your PATH

Concept by concept

Eloquent → sqlc. In Laravel you write Post::where('published', true)->get(). In ToGO you write the SQL once in a query file and sqlc generates a typed Go function. No reflection at runtime, and the compiler catches a renamed column.

Migrations → Atlas. You still describe tables per resource; Atlas plans and applies the change. togo migrate runs it, and .env is loaded for migrate, seed and dev, just like you expect.

Service providers → plugins. A ToGO plugin implements Name(), Priority(), Register(k) and Boot(ctx, k). It calls togo.Register(p) in init(), and your app imports it. Lower priority boots first, the same idea as provider order. Plugins listen to kernel events through a hook bus (On(event, priority, fn)), similar to Laravel events.

Routes and controllers → Huma + GraphQL. Each resource gets a REST handler with an OpenAPI 3.1 spec (think API resources with free Swagger) and a GraphQL schema. Routing is chi under the hood.

Blade / Inertia → React. The frontend is React (Next.js or TanStack). make:resource also generates the TypeScript client, a hook and a page, so you don't hand-write axios calls.

Packages → the marketplace. Auth (JWT, RBAC, multi-guard, Supabase), payments (Stripe, Paymob, Fawry, Tap, Moyasar, PayTabs, Lemon Squeezy), Redis cache, S3 storage, Meilisearch, Resend mail, NATS queues and more: browse the plugin marketplace.

Laravel Boost / MCP → built in. Every new ToGO app ships an MCP server and a .mcp.json. Claude Code can inspect your schema, routes and logs and run generators through MCP tools.

A first resource, start to finish

go install github.com/togo-framework/cli/cmd/togo@latest
togo new blog
cd blog
togo make:resource Post title:string body:text:nullable published:bool
togo generate
togo migrate
togo serve

No Go toolchain? Grab a binary from GitHub releases.

You now have a table, typed queries, REST + GraphQL endpoints with OpenAPI docs, and a React page for posts.

What you give up (honestly)

  • Laravel's huge ecosystem and its decade of answers. ToGO is pre-1.0 and small.
  • Eloquent's convenience for quick, dynamic queries. sqlc asks you to write SQL.
  • If you pick Postgres today, review the generated schema before migrating; the template is SQLite-first.

What you get

  • One language and one type system from the database to the API, plus TypeScript types on the frontend.
  • Static Go binaries that start fast and deploy to a small server, Fly, Docker or GCP (togo infra:init gcp|fly|docker, then togo deploy).
  • An app that AI agents can understand and drive from day one.

Next: the full ToGO walkthrough.

Moving a Laravel product to Go and want help? Product engineering with Fady Mondy.

Originally published at to-go.dev. Drafted with AI assistance and reviewed by the author.

WhatsApp: https://wa.me/201207860084

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.