Foks
1 month ago
224
3
Laravel

Laravel 8 factories & pivot table

Posted 1 month ago by Foks

Hello, How can I seed a pivot table with a factory?

I'm using the table example listed under https://laravel.com/docs/8.x/eloquent-relationships#many-to-many

How can I then seed the roles_user table with a factory?

Please sign in or create an account to participate in this conversation.