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

Database Laravel Package

laravel/database

Bring Laravel’s database layer to non-Laravel projects: Illuminate Database with migrations, seeders, and Artisan CLI support. Includes Eloquent ORM, query builder, schema tools, and commands like migrate, db:seed, and make:* for MySQL/Postgres/SQL Server/SQLite.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Unified Database Tooling Across Stacks: Enables consistent migration, seeding, and CLI workflows for PHP projects regardless of Laravel adoption, reducing fragmentation in developer tooling.
  • Accelerated Onboarding for Non-Laravel Projects: Justifies adopting Laravel’s database layer for standalone PHP apps (e.g., legacy systems, microservices) to leverage Eloquent, migrations, and Artisan without full Laravel overhead.
  • Build vs. Buy: Avoids reinventing migration/seeding tools from scratch for PHP projects, lowering devops/tooling costs while maintaining flexibility.
  • Roadmap for Polyglot Persistence: Supports a phased migration strategy—teams can adopt Laravel’s database layer incrementally while keeping other parts of the stack independent.
  • Use Cases:
    • Legacy System Modernization: Retrofit migrations/seeding to old PHP apps without full Laravel rewrite.
    • Microservices: Standardize database tooling across services (e.g., shared migrations for event-sourced systems).
    • Prototyping: Rapidly scaffold databases for proof-of-concepts using make:migration, make:model, etc.
    • DevOps/Testing: Leverage migrate:fresh, db:wipe, and tinker for CI/CD pipelines or local dev resets.

When to Consider This Package

  • Adopt When:
    • Your PHP project needs migrations, seeding, or Artisan CLI but isn’t (or won’t be) a full Laravel app.
    • You’re building standalone PHP services (e.g., APIs, workers) and want to avoid vendor-lock to Laravel while gaining database tooling benefits.
    • Your team is already familiar with Eloquent and wants to reuse that knowledge in non-Laravel contexts.
    • You prioritize developer velocity over minimal dependencies (e.g., trading ~5MB for artisan and migrations).
  • Look Elsewhere If:
    • You need full Laravel framework features (e.g., routing, Blade, queues)—this is only for database tooling.
    • Your project uses non-PHP databases (e.g., MongoDB, Redis) or requires custom migration logic beyond Eloquent’s scope.
    • You’re constrained by hard dependencies (e.g., embedded environments where Composer isn’t viable).
    • You prefer lightweight alternatives like Doctrine Migrations or custom scripts for simple projects.

How to Pitch It (Stakeholders)

For Executives: "This package lets us use Laravel’s battle-tested database tooling—migrations, seeding, and CLI commands—without adopting the full framework. For example, we can standardize artisan migrate across all PHP services, reducing onboarding time for new hires by 30% and cutting devops overhead for database resets. It’s a low-risk way to modernize legacy systems or unify tooling across microservices, with minimal dependency bloat."

For Engineering: *"Imagine running php artisan make:migration in a non-Laravel PHP project—this gives you:

  • Eloquent ORM for models without Laravel’s routing/Blade.
  • Artisan commands (db:seed, migrate:fresh) for local/dev workflows.
  • Scaffolding (make:model, make:factory) to speed up prototyping. It’s like ‘Laravel Lite’ for databases: drop it into any PHP project and get 80% of the database tooling benefits. Perfect for services, scripts, or legacy apps where we only need the database layer."*

For DevOps: *"This replaces custom migration scripts and manual seeding with a single CLI tool (artisan). Key wins:

  • Consistent workflows: Same commands across all PHP services (e.g., migrate:reset in CI).
  • Reduced flakiness: Built-in rollbacks, status checks, and fresh resets cut debugging time.
  • No Laravel bloat: Only ~5MB for migrations/seeding vs. reinventing wheels."*
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport