harris21 / laravel-aegis
PublicAegis for Laravel — scaffolding and validation helpers for Value Objects.
Laravel Aegis is a code generation and validation package for PHP/Laravel applications. It helps developers create 'Value Objects'—special classes that wrap simple values like emails, URLs, or codes with built-in validation and cleanup rules. Instead of writing 70+ lines of boilerplate code for each value type, developers run a single command that generates a complete, production-ready class. The package automatically wires these classes into database models, form validation, and test templates. It also includes a scanner that analyzes existing code to suggest which fields would benefit most from this protection. The result is an application where invalid data is rejected at the boundary, never reaching the core business logic.
How It Works
Your app uses plain strings for emails and URLs everywhere, and nothing validates them until they cause bugs deep in your code.
Laravel Aegis creates special classes that automatically check and clean your values the moment they arrive, blocking bad data before it spreads.
A single command generates a complete Email class that validates, normalizes to lowercase, and includes a test template—everything you need, nothing you don't.
Your database automatically uses the Email class when reading and writing, keeping your data clean at the source.
Invalid emails are rejected with clear error messages before they ever reach your code.
A built-in scanner walks through your models and database structure, suggesting other fields that would benefit from the same protection.
Bad values never reach your business logic. Every email, URL, and special field is validated and normalized the moment it enters your system.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.