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

Database Laravel Package

scafera/database

Database utilities for Laravel: a lightweight package that simplifies common database workflows, schema tasks, and query helpers with clean, framework-friendly APIs. Integrates seamlessly with Eloquent and Laravel’s database layer.

View on GitHub
Deep Wiki
Context7

Getting Started

Install the package via Composer and publish its config if you need to customize migration discovery paths or rule registries. Begin with the new README introduction block for a one-screen overview of the package’s purpose and conventions. The fastest first use case is to apply a validation rule by its stable rule ID in a form request or validator, or to run the SeedCommand to generate a seeder that follows the Seed suffix convention. Check the package’s config file for the migration path and any rule ID mappings before wiring it into your app.

Implementation Patterns

  • Stable rule IDs: Reference validation rules by their stable IDs in validation arrays, config files, and tests. This decouples your code from rule class names and keeps error messages consistent when rules are renamed or reorganized.
  • Custom migration locations: Point the package at a non-standard migration directory (e.g., a tenant or module subdirectory). The new pre-discovery validation fails fast if the path is missing, so include this check in deploy scripts or CI to catch misconfigurations early.
  • Seed generation: Use the SeedCommand to scaffold seeders. Follow the Seed suffix convention shown in the updated help output (e.g., UserSeed); this keeps generated files consistent with the package’s expectations and avoids confusion with Laravel’s default Seeder suffix.
  • CI integration: Run the package’s discovery or validation commands in CI before migrate to ensure migration paths exist and rule IDs resolve correctly.
  • Extending validators: If you add custom validators, assign stable IDs following the package’s convention so they can be referenced the same way as built-in rules.

Gotchas and Tips

  • The migration location must exist before discovery runs. Create directories during deployment or local setup; otherwise, discovery may silently return nothing.
  • Stable rule IDs are now part of the public API. Avoid hard-coding validator class names in configs—use IDs to future-proof your validation setup.
  • The SeedCommand help example now uses the Seed suffix. If you have existing seeders named with Seeder, either rename them or adjust your workflow to avoid confusion when using the command.
  • Debugging: if discovery finds no migrations, verify the configured path and file permissions. Enable verbose output if the package provides it.
  • Extension points: custom validators can implement the rule ID interface; check the package’s contracts for the exact method names and registration process.
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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route