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 Stubs Laravel Package

spatie/laravel-stubs

Opinionated Laravel stub templates from Spatie. Publish customized stubs for migrations, controllers, and models: no down() in migrations, controllers don’t extend a base, no guarded attributes, more return types, fewer docblocks.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Developer Experience (DX) & Velocity: Accelerates scaffolded code generation by aligning with modern Laravel best practices (e.g., dropping down() migrations, avoiding base controllers, or guarded attributes), reducing onboarding time for new developers.
  • Consistency & Standards: Enforces a team-wide coding standard for stubs, minimizing ad-hoc deviations and improving code review efficiency.
  • Build vs. Buy: Eliminates the need to maintain custom stub templates in-house, saving engineering time and reducing technical debt.
  • Roadmap for New Features: Enables faster prototyping of new Laravel-based features (e.g., APIs, admin panels) by providing clean, opinionated starting points.
  • Onboarding & Training: Reduces friction for junior developers by providing familiar, standardized templates that align with Laravel’s evolving conventions.

When to Consider This Package

  • Adopt if:

    • Your team prioritizes modern Laravel conventions (e.g., no down() migrations, explicit return types).
    • You want to standardize stubs across projects without reinventing the wheel.
    • Your team values minimalist, opinionated defaults (e.g., no docblocks, no base controllers).
    • You’re using Laravel 8+ and want to align with its evolving best practices.
    • You lack internal resources to maintain custom stub templates.
  • Look elsewhere if:

    • Your team requires custom stubs with unique logic (e.g., legacy down() migrations, specific base controllers).
    • You need highly specialized stubs (e.g., for niche frameworks or legacy systems).
    • Your organization prefers explicit documentation (docblocks) in generated code.
    • You’re using Laravel < 8 and rely on older conventions.

How to Pitch It (Stakeholders)

For Executives: "This package standardizes Laravel code generation with modern best practices—saving our team time on boilerplate while ensuring consistency. By adopting opinionated stubs (e.g., no down() migrations, explicit return types), we’ll accelerate development velocity and reduce onboarding friction for new hires. It’s a low-risk, high-reward way to align with Laravel’s evolution without reinventing the wheel."

For Engineering: *"Spatie’s Laravel stubs give us a clean, opinionated starting point for migrations, models, and controllers—aligned with Laravel 8+ conventions. Key benefits:

  • Faster scaffolding: No more debating down() migrations or base controllers.
  • Consistency: Enforces a team-wide standard (e.g., unguarded attributes by default).
  • Maintenance-free: No need to update custom templates; Spatie handles it.
  • Modern PHP: Uses return types and minimalist code by default. Let’s trial it in our next feature sprint to compare DX with our current stubs."*
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