Documentation v1.1.0

Preview

Setup API

By default all http requests made by axios are sent to https://preview.keenthemes.com/metronic8/laravel/api url, you can update the default url in file .env variable VITE_APP_API_URL. This variable is used to set the baseURL for axios instance in src/core/services/ApiService.ts.
ApiService.vueInstance.axios.defaults.baseURL = process.env.VUE_APP_API_URL;
You can find the source code of our API in Metronic Laravel Starterkit. Check all available api endpoints in file laravel/routes/api.php.
To get started with laravel api locally follow steps below:
  1. Run laravel theme using quick start doc.
  2. Keep the server running.
  3. In another command line run vue app with vue getting started doc.
  4. By default laravel app is served on url http://127.0.0.1:8000, to use the local api you need to update VUE_APP_API_URL variable in file .env to http://127.0.0.1:8000/api.
Preview Get Help Buy Now