This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Bhargav
Bhargav

In Many To Many Relations detach stopped working, attach is working.

# Many To Many Relations detach not working
$user->citys->detach($duplicate_id);

Error:
Method October\Rain\Database\Collection::detach does not exist.
daftspunky
daftspunky

Hi Bhargav

You may need this code instead:

$user->citys()->detach($duplicate_id);
Bhargav
Bhargav

Thanks. I Missed a Bracket :(

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.