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

Generators Laravel Package

bpocallaghan/generators

A Laravel package by Ben Plummer that extends Artisan's built-in generators, adding commands to quickly scaffold models, controllers, requests, migrations, seeders, and more with sensible defaults.

View on GitHub
Deep Wiki
Context7

Laravel File Generators with config and publishable stubs

Frequently asked questions about Generators
What is bpocallaghan/generators and what does it actually do?
It is a Laravel developer-experience package by Ben Plummer that extends Artisan's built-in GeneratorCommand family with extra make-style commands. Instead of generating a single class, it can scaffold a model together with its migration, factory, seeder, request, controller and other related artifacts in one go. It is driven by a publishable config/generators.php file and publishable stub templates, so the output is opinionated but customizable. It has no runtime role in your application, so it is best treated as a require-dev convenience rather than a platform dependency.
How do I install bpocallaghan/generators in a Laravel project?
Install it with Composer as a dev dependency, for example composer require --dev bpocallaghan/generators. The package supports Laravel package auto-discovery, so its service provider and console commands are registered without manual edits to config/app.php. After installation, run php artisan vendor:publish to expose the config file and stub templates so you can commit them to version control. Pinning an exact version is recommended because generated code becomes part of your source tree.
Which Laravel and PHP versions does bpocallaghan/generators support?
The package's composer.json declares version constraints, but you should treat those as a floor rather than proof of compatibility. The last tagged release was in April 2024, so verify explicit support for your target Laravel major by checking the repository's CI matrix and issue tracker. If your application runs a newer Laravel release, generate a small fixture artifact and diff the output against your existing conventions before rolling it out to the team.
Does the package override Laravel's native make: commands?
It primarily adds new command names rather than replacing the framework's make:* signatures, but you should confirm this for the version you pin. Because Laravel resolves console commands through the service container and registration order, any overlap with native commands can produce different behaviour between projects. Run php artisan list before and after installation on a scratch branch to see exactly which commands are added or shadowed. If you need guaranteed native behaviour, keep the package out of environments where that matters.
How do I customize the generated stubs to match my project's coding style?
Publish the stubs with php artisan vendor:publish and commit them into your repository, typically under resources/stubs or a stubs directory. Once published they belong to your project, not the vendor, so you can adjust namespaces, annotations, DTO or value-object conventions and test scaffolding directly. Any future package update will not silently overwrite your customized copies, which is exactly what you want. Review published stubs as part of code review whenever you bump the package version.
Can I configure the output paths and namespaces used by the generators?
The package exposes a publishable config/generators.php file that drives its default behaviour, including paths and namespaces for the artifacts it creates. Publish that config and commit it so every developer on the team generates identical output. For projects with heavy Domain-Driven Design layering or non-standard namespaces, be aware that overriding too much of the default config erodes the main benefit of the package. If you find yourself rewriting most of the config, an internal generator may be the better choice.
Should bpocallaghan/generators be a require-dev dependency or a production dependency?
Install it as require-dev. It is purely a scaffolding tool that registers console commands and never touches the request lifecycle, the container hot path, or the database at runtime. Keeping it out of production installs reduces your dependency surface and avoids shipping generator commands to servers. Removal later is a single composer remove with no database migrations or config cleanup required.
Is bpocallaghan/generators still maintained and safe to depend on?
It is a single-author package with a modest star count and a last release in April 2024, so factor maintainer concentration and Laravel version drift into your decision. For a developer-experience convenience that blast radius is low, but it would be unwise to make it a load-bearing part of your platform. Pin an exact version, keep published stubs under your own control, and have a fallback plan such as your own internal generator. Check the maintainer's responsiveness to recent Laravel major releases before committing.
How do I test that generated files stay correct after a Laravel upgrade?
Add a CI job or a local acceptance check that runs the package's commands against a pinned Laravel and PHP version and diffs the generated fixture artifacts against committed expectations. Because generated output becomes real source code, a Laravel major upgrade can silently change skeleton conventions such as directory layout, default namespaces, attribute-based model configuration, or Pest versus PHPUnit defaults. If the diff is non-empty, update your published stubs deliberately rather than accepting drift. This stub regeneration check is the single most valuable safeguard when using any scaffolding package.
How do I remove bpocallaghan/generators if my team decides not to keep it?
Run composer remove --dev bpocallaghan/generators and delete any published config or stub files you no longer want. The package registers no migrations, no routes, and no service bindings your application depends on at runtime, so there is nothing to unwind in the database or container. Generated artifacts already committed to your repository simply remain as ordinary source files. That reversibility is one of the strongest arguments for trying it on a single squad before wider rollout.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager