Skip to content

Migrating from Laravel

Pondoknusa borrows Laravel's mental model — routes, middleware, Eloquent-style models, queues, and Blade-like views — while targeting TypeScript and Node.js 26+ (or Bun). This guide maps familiar Laravel concepts to Pondoknusa equivalents.

Application bootstrap

LaravelPondoknusa
bootstrap/app.phpsrc/main.ts + src/providers/app-service-provider.ts
config/*.phpconfig/*.ts with typed env() and optional schema
.env.env (same idea; validated on boot)
php artisan servepondoknusa dev or pondoknusa serve
php artisanpondoknusa CLI (migrate, make:*, queue:work, …)

Routing

LaravelPondoknusa
routes/web.phpsrc/routes/web.ts
Route::get('/', …)Route.get('/', …) from @pondoknusa/core
Route model bindingrequest.routeModel('post')
php artisan route:listpondoknusa route:list
php artisan route:cachepondoknusa route:cache

Controllers are TypeScript classes with async methods. Invokable controllers use __invoke.

Views

LaravelPondoknusa
Blade (.blade.php)Tyr templates (.tyr)
@extends, @section@layout, @section, @yield
<x-alert /> components@component('alert')
Livewire / islands@island + client registerIsland()
Programmatic UI.tyr.ts views with render() / mount()

Run pondoknusa view:types for typed props (ViewPropsMap). Lint with pondoknusa view:lint --strict.

Eloquent → models

LaravelPondoknusa
User::find(1)await User.find(1)
$user->posts()user.posts() relation helpers
Migrationsdatabase/migrations/*.ts + pondoknusa migrate
Factories / seederspondoknusa make:factory, pondoknusa db:seed
Soft deletesSoftDeletes trait on models

Models live in src/models/ and extend Model from @pondoknusa/database.

Auth

LaravelPondoknusa
php artisan install:api / Breezepondoknusa auth:install
SocialiteBuilt-in OAuth drivers in @pondoknusa/auth
Auth::user()Auth.user() facade
Gates / policiesGate + policy classes

Queues & events

LaravelPondoknusa
ShouldQueue listenersQueue-backed listeners via @pondoknusa/queue
php artisan queue:workpondoknusa queue:work or pondoknusa dev --queue
event() / Event::dispatchEvents.dispatch()
Bus::dispatchBus.dispatch() with auto-resolved handlers

Register explicit handlers with Bus.register(Command, Handler) when you prefer explicit wiring over convention.

Mail & notifications

LaravelPondoknusa
Mailable classesClasses implementing mail contracts in @pondoknusa/mail
php artisan make:notificationpondoknusa make:notification (via notifications package)
MAIL_MAILER=logSame env key; log driver for local dev

Testing

LaravelPondoknusa
PHPUnit / PestVitest + @pondoknusa/testing
php artisan testpondoknusa test
$this->get('/')test.http.get('/') with assertion helpers
actingAs($user)test.http.actingAs(user)

See Testing for HTTP recipes, queue draining, and parallel Vitest workspaces.

Deployment

LaravelPondoknusa
php artisan config:cachepondoknusa config:cache / config:clear
php artisan view:cachepondoknusa view:cache
Forge / Vapor patternsdeploy/ scaffold (Docker, Fly, Railway)
Health checks/health/live and /health/ready

Run pondoknusa deploy:check before shipping to validate doctor checks, route compilation, and view cache.

Debugging

LaravelPondoknusa
Telescope (paid/complex)pondoknusa debug:install + debug bar
Query logDebug bar query count + N+1 warnings
php artisan tinkerpondoknusa shell (.routes, .models, persistent history)

Suggested first steps

  1. npm create pondoknusa@latest or pondoknusa new my-app --template=saas
  2. pondoknusa migrate and pondoknusa dev
  3. Port routes from routes/web.php to src/routes/web.ts
  4. Convert Blade layouts to .tyr and run pondoknusa view:lint
  5. Move models and migrations; run pondoknusa test

For a working reference app, see examples/hello-world and examples/saas-starter.

Released under the MIT License.