Just a Geek
See more
$car->drivers()->attach([ $driver1->id, $driver2->id,]);
If you can put your head down, push through the hard times, and commit, you can do anything you want to.
The implementation creates a new Team model and it acts as an adapter between your controller and the Model itself.