Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Laravel fixed their model syncing in a recent update
- */
- // change this (wherever you may see it)
- if (request('brand')) {
- $opportunity->brand()->sync(request('brand'));
- } else {
- $opportunity->brand()->detach();
- }
- // to just this
- $opportunity->brand()->sync(request('brand'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement