'boolean', 'is_remember' => 'boolean', ]; public static function default(): int { return static::where('is_bill', true)->where('is_remember', true)->first()->id; } public function isAccepted(): bool { return false === $this->is_bill && false === $this->is_remember; } // ---------------------------------- Scopes ----------------------------------- public function scopeNeedsPayment(Builder $query): Builder { return $query->where(function (Builder $query): Builder { return $query->where('is_bill', true)->orWhere('is_remember', true); }); } }