bjnstnkvc/builder-make-command
A Laravel Artisan command that scaffolds builder classes, generating boilerplate so you can define query-building logic faster. Run the make command to create a ready-to-edit builder stub in your app.
composer require --dev vendor/package:^1.0.9 (the --mixin flag does not exist below 1.0.9, so pin at least that version in composer.json and commit the lock file).php artisan list and php artisan <command> --help. The --help output is the authoritative reference for the flag set — confirm --mixin is listed before wiring it into scripts, since 1.0.9 is the first release that accepts it.php artisan vendor:publish --provider="Vendor\Package\ServiceProvider" (or --tag=...). Read the published config first; it tells you where generated artifacts land and which paths the command scans.--mixin and diff, so you can see exactly what the new flag adds rather than mixing baseline noise with feature output.git diff --exit-code guard. Add --mixin on the second pass once you have confirmed the extra mixin output is stable and idempotent.Where to look when something is off, in order: the published config file → the command class in vendor/ (src/Console/) → the generator/service the command delegates to → the generated output directory.
Composer script as the single entry point. Don't let developers memorise flags; expose one script so the flag set evolves in one place:
"scripts": {
"generate": "@php artisan <command> --mixin",
"generate:check": "@php artisan <command> --mixin && git diff --exit-code"
}
CI drift check. Run generate:check in the pipeline. Because --mixin changes the emitted file set, an unpinned version in CI is the classic source of "passes locally, fails in CI" — lock the version and run composer install (not update) in CI.
Adopt --mixin as an additive, reviewable change. Land it in its own PR containing only: the version bump, the flag added to the script, and the newly generated mixin output. That diff is the documentation for what the flag does in your codebase.
Keep generated output in version control, config out of it. Commit the artifacts (including the mixin) so consumers of the repo don't need the package installed; keep environment-specific paths in config driven by env vars, not committed overrides.
Layer with existing flags. Check --help for interaction between --mixin and output/namespace/path flags; if the mixin is written to a path derived from an existing --path or namespace option, set both together in the script rather than relying on defaults.
Consume the mixin where it's imported, not where it's generated. Treat the mixin as a shared base applied at the call site. If your toolchain requires registration (a tsconfig include, an autoload entry, a namespace import), add that registration in the same PR as the flag — the command will not do it for you.
Pair with a lint/typecheck step. Generation succeeding says nothing about the output being valid for downstream tooling; run your formatter and typechecker after generate in CI.
composer show vendor/package and php artisan <command> --help in the same shell you run the script from.--mixin after upgrading and diff against the committed baseline before adopting the flag.--mixin and confirm the second run produces a zero-byte diff. If it doesn't, the mixin generator is non-deterministic (timestamps, ordering, hash suffixes) and will break your CI guard — file it and exclude that artifact from the check until fixed.require-dev and in the build stage.-v / -vvv for the command, and check the package's log channel if it has one. If output is empty, the scan paths in config are the usual culprit (relative paths resolve from the project root, not the config file).--mixin run in any repo that already has hand-written mixins.--mixin and the CI diff fails on their commits.How can I help you explore Laravel packages today?