public function toggleFollowUser($contact, $twitterId)
{
$client = initTwitter();
try {
if ($contact->following) {
$contact->following = 0;
$client->post('friendships/destroy.json?follow=true&user_id=' . $twitterId);
Session::flash('flash_success', trans('crm-launcher::success.unfollow'));
} else {
$contact->following = 1;
$client->post('friendships/create.json?follow=true&user_id=' . $twitterId);
Session::flash('flash_success', trans('crm-launcher::success.follow'));
}
$contact->save();
} catch (\GuzzleHttp\Exception\ClientException $e) {
getErrorMessage($e->getResponse()->getStatusCode());
return back();
}
}