'required|max_length[100]|is_unique[ai_providers.name]', 'display_name' => 'required|max_length[255]', ]; // Get builtin providers only public function getBuiltinProviders() { return $this->where('is_builtin', true) ->orderBy('name', 'ASC') ->get() ->getResultArray(); } // Get custom providers only public function getCustomProviders() { return $this->where('is_builtin', false) ->orderBy('name', 'ASC') ->get() ->getResultArray(); } // Get provider by name public function getByName($name) { return $this->where('name', $name) ->get() ->getRowArray(); } }