$diff = $this->from->diff($this->to);
if ($diff->d > 0) {
return $diff->d . ‘લ’;
}
[…]
}
}
class User extends Model
{
public function getLastLoggedInAtAttribute($value)
{
return new ElapsedTime($value, Carbon::now()); // Nલ, N࣌ؒલ, Nલ, ͨͬͨࠓ
}
} // accessors & mutators
$user->last_logged_in_at // instance of ElapsedTime