In my controller first i attach array of ids like this for my additional fields:
$property->features()->attach($additional_ids);
Then im using sync()
because i have checkboxes :
$property->features()->sync($features);
But problem is when i have this then my attach()
is not working. Any suggestion how can i fix this? When i remove this sync()
my attach is working. So idea is that i have checkboxes for features, and i have input fields for some additional features.I store this ids in pivot table .
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2jsdP9F
via IFTTT
Aucun commentaire:
Enregistrer un commentaire