public toggleActive ( integer $id ) : boolean | ||
$id | integer | |
Результат | boolean |
public function toggleActive($id)
{
$user = $this->findWithTrashedById($id);
$user->update(['is_active' => !$user->is_active]);
return $user->is_active;
}