dimanche 26 février 2017

Using Factory for seeding pivot table in Laravel5

I have a pivot table named lesson_tag and now I want to seed this table using factory. How I can do this without defining any model for lesson_tag.

This is the way laravel suggests for defining factories:

$factory->define(App\Tag::class, function ($faker) {
   .
   .
   .
}

But as you can see, it needs a model.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2mruMCk
via IFTTT

Aucun commentaire:

Enregistrer un commentaire