Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Stickler Laravel Package

voorhof/stickler

Stickler is a Laravel package that brings validation to Eloquent models. Define rules and custom messages directly on your model, and Stickler validates attributes before saving, helping keep your database clean and consistent.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Start with the v1.2.0 changelog items that can affect existing code: #[RouteKey], Fit::Contain → Fit::Crop, media preview sizing, removal of laravel-lang/lang, and the new contact reply mail action.
  • Look first at:
    • Models that override getRouteKeyName().
    • Media conversion definitions, especially preview and image-fit usage.
    • Rich Editor configuration for SourceCodePlugin.
    • Contact message flow and mail templates.
    • Social link Blade partials.
  • After upgrading, run Composer/NPM updates, clear caches, then discover and run GenerateMissingResponsiveImagesCommand via php artisan list before relying on existing media.
  • First practical use case: upgrade a site using slug-based route model binding, replace getRouteKeyName() with #[RouteKey], switch any Fit::Contain usage to Fit::Crop, and regenerate missing responsive images for existing media records.

Implementation Patterns

  • Use the new #[RouteKey] attribute on models instead of overriding getRouteKeyName(). Keep route model binding tests around slugs and custom keys, since this is a behavior-sensitive refactor.
  • Define media conversions explicitly, e.g. a 400px preview conversion, and use Fit::Crop where the release previously used Fit::Contain. Centralize conversion definitions so future enum/API changes are easier to update.
  • Run GenerateMissingResponsiveImagesCommand as part of deployment or a scheduled maintenance job after media configuration changes. For large media libraries, run off-peak or in batches if the command supports it.
  • Register SourceCodePlugin only where trusted users need HTML source editing in the Rich Editor. Pair it with sanitization and permission checks.
  • Use SendMessageReplyMailAction with ContactMessageReply for contact replies. Queue mail where possible and persist the reply/contact state before sending.
  • Guard social link rendering with null/empty checks in Blade, especially if links are configurable or optional.
  • Keep upgrade work in small commits: route-key refactor, media-fit refactor, mail feature, and asset/tooling updates should be independently testable.

Gotchas and Tips

  • Breaking rename: Fit::Contain is now Fit::Crop. Search the codebase for Fit::Contain and related imports before deploying.
  • Route binding behavior: replacing getRouteKeyName() with #[RouteKey] can silently change generated URLs or route resolution if any model still has a custom override. Verify route:list, generated links, and binding tests.
  • Media regeneration: changing preview conversion sizing does not necessarily rewrite existing files. Clear/regenerate conversions and run the new missing-responsive-images command; watch for stale files and storage/CDN caching.
  • Removed dependency: laravel-lang/lang is gone. Check validation messages, translations, and language files that may have depended on it, and add explicit translations if needed.
  • Rich Editor source mode: SourceCodePlugin can expose raw HTML editing. Ensure sanitization, authorization, and content security policies still apply.
  • Laravel Head package: newly installed; check middleware/config ordering and rendered <head> output for duplicate or missing meta tags.
  • Mail action: test with MAIL_MAILER=log or a fake queue first. Confirm the contact message state, recipient address, and reply template are valid before enabling in production.
  • Debugging checklist: php artisan optimize:clear, php artisan route:list, targeted feature tests for route keys/media/mail, and storage/log inspection after running the responsive-images command.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo