Laravel Typegen is an awesome library that lets you generate TypeScript types from your Laravel code Generate TypeScript types from Laravel models

Provide useful types for Laravel (e.g. pagination, etc).

*/ protected $casts = [ 'gender' => GenderType::class, ]; This library will generate the following TypeScript types: export type User = { id: number; name: string; email: string; gender: GenderType; email_verified_at?: string; created_at?: string; updated_at?: string; posts?: Post[]; }; export enum GenderType { Male = "Male", Female = "Female", Other = "Other"}

Path to enum files (default: "app/Enums") -z, --ziggy Generate types for ziggy (default: false) -h, --help display help for command
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners