nicolasjourdan/business-logic-bundle
A PHP package for cleanly organizing business logic into reusable, testable components. It helps separate domain rules and workflows from controllers and framework code, making Laravel/PHP applications easier to maintain, extend, and test while keeping services lean.
composer update) and confirm the new generators are registered by running php artisan list make. You should see make:specification and make:rule alongside the existing makers.php artisan package:discover (or composer dump-autoload) after the upgrade — new maker commands are registered through the service provider and won't appear until discovery re-runs.config/ file (maker namespaces/paths) and its stubs/ directory. Those two places tell you where generated classes land and what they look like before you commit to the pattern.php artisan make:specification ActiveSubscriptionSpecification for a reusable, composable domain predicate.php artisan make:rule EligibilityRule for a Laravel validation rule object consumed by a FormRequest.ActiveSubscription, WithinSpendLimit), keep them side-effect free, and compose them rather than branching in controllers or services. This is the pattern that pays off fastest: specifications become the single source of truth reused by policies, queries, and validation.make:rule to produce ValidationRule implementations, then reference them from FormRequests via new EligibilityRule($tenant). Keep rules thin — inject or delegate to a specification so the same logic isn't duplicated in two dialects.validate() call isSatisfiedBy(). This keeps rules testable in isolation and reusable outside HTTP.App\Domain\...\Specifications and rules at App\Rules. Doing this on day one avoids a later rename sweep.make:rule. Laravel ships its own make:rule. Depending on registration order, one wins. Verify which stub you actually got by diffing the generated file, and prefer the fully-qualified command form if the package namespaces its commands.php artisan optimize:clear before filing a bug — especially in Docker/CI images built from a layer cache.void return types on validation rules (required in Laravel 10+) and typed parameters.isSatisfiedBy() referentially transparent.--test flag, and register it in the service provider rather than editing vendor files.-v to see the resolved target path. If a file is created in an unexpected directory, the cause is almost always the config path value, not the maker.How can I help you explore Laravel packages today?