Learner\Repositories\Eloquent\UserRepository::toggleActive PHP 메소드

toggleActive() 공개 메소드

Change user's status.
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;
    }