*/ use HasFactory; protected $fillable = ['name', 'vendor', 'active']; /** * Case-insensitive lookup by canonical name — the single matching rule * used by imports and future submissions to link gpu_id. */ public static function match(?string $name): ?self { if ($name === null || trim($name) === '' || in_array(strtolower(trim($name)), ['unknown', 'hosted', 'cloud'], true)) { return null; } return static::query() ->whereRaw('lower(name) = ?', [strtolower(trim($name))]) ->first(); } public function scopeActive(Builder $query): Builder { return $query->where('active', true); } }