useSanctumOptions()
useSanctumOptions() provides direct access to the module's configuration settings. It is a convenient alternative to using Nuxt 3's useRuntimeConfig() to retrieve configuration values.
Features
Quick Configuration Access:
Instead of manually retrieving configuration options viauseRuntimeConfig(),useSanctumOptions()provides a straightforward way to access settings like API endpoints, authentication modes, and more.Example:
javascriptconst options = useSanctumOptions(); console.log(options.apiUrl); // Outputs runtimeConfig.public.laravelSanctum.apiUrlCentralized Configuration Management: By using this composable, you ensure that all parts of your application access the same configuration settings, reducing the risk of inconsistencies.