2

I can't seem to find any good and up to date resources on how to accomplish this.

I basically want to do this from within my package:

$factory->define(MyPackage\About\Models\About::class, function (Faker $faker) {
    return [
        "title" => $faker->text(5),
        "image" => $faker->imageURL,
        "content"   => $faker->text,
        "metadata_id" => null,
    ]; 
});

Can this be done?

Thanks,

Kevin Pimentel
  • 2,056
  • 3
  • 22
  • 50
  • 1
    Does this help? https://github.com/laravel/framework/issues/11881#issuecomment-261688266 – ceejayoz Apr 12 '19 at 18:17
  • 2
    Alternatively it might be possible to simply include the package factories somewhere within the application factories. – Namoshek Apr 12 '19 at 18:19

0 Answers0