mergeFillable(['code']); } public function scopeCode(Builder $query, string $code): Builder { return $query->where('code', $code); } public static function getByCode(string $code): ?static { return static::query()->code($code)->first(); } }