Skip to content

v1.91.2

Choose a tag to compare

@MichaelSowah MichaelSowah released this 27 Oct 20:38
· 5 commits to main since this release
8233be9

[1.91.2] - 2026-10-27 — Alshain

Fixed

  • db:seed runs app seeders. It asked the container for the seeder, and the container only
    builds registered services, so every seeder generated by scaffold:seeder failed with
    "Service 'App\Database\Seeders\…' not found". db:seed, seeder dependencies and Seeder::call()
    now use the new Seeder::make(), which takes the container's definition when one exists and
    builds the seeder directly otherwise. With no argument, db:seed looks for
    App\Database\Seeders\DatabaseSeeder first.
  • Model::factory()->create() works. factory() built its factory without an application
    context, so the documented User::factory()->create() always threw "ApplicationContext is
    required to create models". Factories now fall back to the app's model context set at boot;
    outside a booted app pass one with Model::factory($count, $context) or the new
    Factory::withContext($context). Models from make() carry the context too, so they can be saved
    later. Factory lookup tries App\Database\Factories\ before Database\Factories\.

Added

  • Model::getDefaultContext(), Factory::withContext(), Seeder::make(), and an optional
    $context parameter on HasFactory::factory() / factoryUsing().