mardi 5 avril 2016

Laravel 5.2: Unable to locate factory with name [default]

I want to seed database when I use this

 public function run()
{
    $users = factory(app\User::class, 3)->create();
}

Add three user in database but when I use this

 public function run()
{
    $Comment= factory(app\Comment::class, 3)->create();
}

Show me error

[InvalidArgumentException]
Unable to locate factory with name [default] [app\Comment].



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire