Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.

ostap liked this thread

1

I think you are referring to this: http://laravel.com/docs/eloquent#working-with-pivot-tables

EDIT:

Related data on pivot tables can be added like this according to the documentation.

$user->roles()->sync(array(1 => array('expires' => true)));
Last updated 2 years ago.

ostap liked this reply

1

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.