Download the PHP package baconfy/support without Composer
On this page you can find all versions of the php package baconfy/support. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package support
Baconfy Support
A handy Laravel support package: reusable traits for common model behavior — UUIDs, ULIDs, slugs — a storage cast, a FormRequest with per-verb rules, and a base for application intents that validate and authorize before they act.
Features
- Auto UUID and ULID generation for Eloquent models
- Unique slugs (with optional soft delete awareness)
- Intents: one class per thing the app can be asked to do, callable from any entry point
- Drop-in traits — quick to use, easy to maintain
- Minimal setup, maximum utility
Installation
Usage
Casts
Storage cast for eloquent models
FormRequest
A better way to validate your forms. Available methods: authorize, view, store, update, destroy.
UUIDs
Add automatic UUIDs to your models:
ULIDs
Same idea, sortable by time. Fills a ulid column on create:
Both traits fill a secondary column next to your usual
id. For a ULID or UUID primary key, use Laravel's ownHasUlids/HasUuids.
Slugs
Generate unique slugs from an attribute:
✨ If the slug already exists, a suffix is added automatically to keep it unique — even with soft deletes!
Intents
One class per thing the application can be asked to do — register a user, close a month — callable the same way from a controller, a console command or an MCP tool. It runs the FormRequest lifecycle without the HTTP: sanitize → authorize → rules → after → handle. Only __invoke is public, so nothing reaches handle() without passing the checks.
Every hook is optional but handle(). Failures throw — ValidationException, AuthorizationException — and the entry point decides how to answer.
A field with no rule is refused, not dropped. Input may come from a console argument or a tool call as easily as from a form, and a key nobody declared is a key nobody checked. An intent with no rules accepts no input at all.
License
MIT — do what you want, just give credit.
Made with ❤️ by Baconfy
All versions of support with dependencies
hashids/hashids Version ^5.0
illuminate/validation Version ^11|^12|^13
illuminate/auth Version ^11|^12|^13