Skip to content

Commit

Permalink
minor fix when changing user status
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirmuxsin committed Dec 8, 2023
1 parent b101c12 commit dbd688e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/FSM/FSM.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ public static function update(string $status, int $user_id = null)
if (!$user_id) $user_id = self::getUserId();
$fsm = \Milly\Laragram\app\Models\FSM::find($user_id);
$fsm['status'] = $status;
return $fsm->save();
if ($fsm->save()) {
self::$status = $status;
return true;
} else {
return false;
}
}

/**
Expand Down

0 comments on commit dbd688e

Please sign in to comment.