Weave Code
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

Laravel Schema Rules Laravel Package

laracraft-tech/laravel-schema-rules

Generate baseline Laravel validation rules from your database schema. Create rules for entire tables or selected columns, generate Form Request classes, and configure columns to always skip. Works across supported drivers and serves as a solid starting point for custom validation.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Developer Productivity: Reduces manual validation rule writing by auto-generating schema-aligned rules, cutting boilerplate and accelerating feature delivery.
  • Consistency & Maintainability: Enforces validation rules that match the database schema, reducing discrepancies between code and database contracts.
  • Build vs. Buy Decision: Justifies buying this lightweight package over custom solutions for teams already using Laravel, avoiding reinventing validation logic.
  • Use Cases:
    • Onboarding new developers (reduces context-switching time).
    • Refactoring legacy systems (aligns validation with existing schemas).
    • Rapid prototyping (quickly scaffold CRUD validation rules).
    • Compliance-heavy projects (ensures validation rules reflect schema constraints).
  • Roadmap Alignment: Supports initiatives like:
    • Standardizing validation across microservices.
    • Reducing technical debt in form-handling logic.
    • Enabling non-developers (e.g., QA) to validate schema changes against rules.

When to Consider This Package

  • Adopt if:

    • Your team uses Laravel 11+ and relies on MySQL/PostgreSQL/SQLite.
    • Validation rules are repetitive (e.g., CRUD operations for 10+ tables).
    • You prioritize schema consistency over custom validation edge cases.
    • Developers spend >20% of time writing/updating validation rules manually.
    • Your project has >5 tables with complex schemas (enums, foreign keys, etc.).
  • Look elsewhere if:

    • You need advanced custom validation (e.g., regex patterns, dynamic rules).
    • Your schema is highly dynamic (e.g., NoSQL or schema-less databases).
    • You’re using Laravel <11 (compatibility gaps may exist).
    • Your team prefers design-first validation (e.g., API contracts over schema).
    • You require float/decimal precision in validation (package lacks granular support).
    • Your database uses unsupported drivers (e.g., SQL Server, Oracle).

How to Pitch It (Stakeholders)

For Executives:

"This package cuts validation development time by 70% for Laravel apps by auto-generating database-aligned rules. For a team managing 20+ tables, that’s ~50 hours/year saved—freeing devs to focus on core features. It also reduces bugs by ensuring validation rules never drift from the schema. Low-risk (MIT license, 363+ adopters), and integrates seamlessly with our existing Laravel stack."

For Engineering:

*"Schema Rules eliminates repetitive validation boilerplate. With a single CLI command (php artisan schema:generate-rules), we get:

  • Foreign key validation (e.g., exists:addresses,id).
  • Type-safe defaults (e.g., date, enum, numeric).
  • Form Request scaffolding (--create-request flag).
  • Configurable skips (e.g., ignore created_at). Tradeoff: Basic rules only—custom logic still requires manual tweaks. Ideal for 90% of CRUD validation needs."*

For Developers:

*"No more copy-pasting required|string|max:255 for every varchar(255) column. Run php artisan schema:generate-rules users to get:

['email' => ['required', 'string', 'max:255']]

Bonus: Add --create-request to auto-generate a StoreUserRequest class. Pro tip: Use --columns to target specific fields, and configure skip_columns in config/schema-rules.php to exclude timestamps."*

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.
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium