roundly-consulting/forms-for-laravel
Forms for Laravel lets you define forms in code with a fluent API, render them in Blade, and handle validation and submissions cleanly. A lightweight way to build and manage dynamic forms without extra admin tooling.
1.0.4), there are no new setup steps required beyond a normal composer update.config/) for a model map or class overrides. The release note confirms the package supports “host swaps” of models — i.e. a host application can replace a package model with its own subclass or implementation.1.0.4+, the factory should instantiate your configured model. Verify with:
$model = Package\Factories\SomeModelFactory::new()->create();
$this->assertInstanceOf(HostApp\Models\SomeModel::class, $model);
Factory::new()->create(), ->count(5), states, etc.). After 1.0.4, the resulting model class follows the host’s swap. This makes it safe to write assertions against host model classes and relationships.newModel() to return the configured class, e.g.:
public function newModel(array $attributes = [])
{
$model = config('package.models.some_model', ParentModel::class);
return new $model($attributes);
}
Otherwise your custom factory can still hardcode the original model and reintroduce the bug this release fixes.php artisan config:clear (or redeploy with a fresh cache) after changing a model mapping, otherwise factories and runtime resolution can disagree.Factory::guessFactoryNamesUsing() or convention-based factory resolution, ensure the host model’s factory name still resolves. A swapped model may not have a matching factory class; use Factory::useNamespace() or explicit ->factory() calls.afterMaking/afterCreating callbacks, and relationship definitions that reference the original model class by name will not automatically follow the swap. Audit them when overriding models.get_class(SomeFactory::new()->make()) or dd(SomeFactory::new()->newModel()). If you see the package model instead of the host model on 1.0.4+, check config caching and whether a custom factory overrides newModel().1.0.4 is a patch-level bug fix for factory model resolution. It is low-risk, but tests that asserted the old (incorrect) class will need updating. No deprecations or breaking changes are indicated.How can I help you explore Laravel packages today?