Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Somehow maybe get this to work?


I've had nothing but issues getting this set up in so many different environments. Trying to follow your documentation is so incredibly frustrating.

Having said that i have been battling away with the Vue Laravel integration. I have followed the steps https://preview.keenthemes.com/metronic8/vue/docs/#/vue-laravel-integration) to the exact letter but is still gives me a 404 on the login api (even though it says it actually successfully logged in, which is kind of scary, but I digress). I can add manually add a route to routes/web and return something and it at least finds the route. But i don't think thats correct.

Can you guys provide some assistance here.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (19)


Hi,

The reason for this is that now we are sending authentication requests to the real API. We are setting the API URL in file src/core/services/ApiService.ts.


ApiService.vueInstance.axios.defaults.baseURL = process.env.VUE_APP_API_URL;


We are getting API URL from .env variable VUE_APP_API_URL. That is not valid for Laravel + Vue integration. To use the .env variable in ts files you have to prefix them with MIX_APP_ instead of VUE_APP_.

I already updated the doc, to fix this now you can follow the steps below:


  1. Add new envirment variable in .env.


  2. MIX_APP_API_URL="https://preview.keenthemes.com/metronic8/laravel/api"

  3. Update variable name in src/core/services/ApiService.ts from process.env.VUE_APP_API_URL to process.env.MIX_APP_API_URL.

  4. Rebuild your client with command npm run dev



Thanks!
That all works just fine now.

So are we supposed to implement an API for auth on our own for a production dashboard? Im having a hard time trying to wrap my head around whether there's a fully integrated auth system included with the product, or if its just the front end theme and components and the rest is up to our team?



Yes, we are sending requests to our own API, the Vue theme provides only a front-end part.

To get started you can check our API setup doc:
https://preview.keenthemes.com/metronic8/vue/docs/#/api-setup



I'm sorry to hear that you're experiencing difficulties with setting up the Vue Laravel integration using Metronic. Let's try to troubleshoot the issue step by step.

Check API Routes: First, ensure that the API routes for authentication (such as login) are correctly defined in your Laravel application. These routes should be located in the routes/api.php file, not routes/web.php. google

Verify Route Configuration: Double-check the route configuration in your Laravel application to ensure that the login route is correctly defined and accessible. You may also want to verify that the route name matches the one specified in the Vue application.

Check CORS Configuration: If your Vue application is hosted on a different domain or port from your Laravel backend, ensure that CORS (Cross-Origin Resource Sharing) is properly configured in your Laravel application to allow requests from your Vue frontend.

Inspect Network Requests: Use your browser's developer tools to inspect the network requests made by your Vue application when attempting to log in. Check if the requests are being sent to the correct URL and if they are returning the expected responses.



Discover the latest trends in ladies clothing brands with Afrozeh, a leading brand known for its high-quality and stylish designs that cater to the modern woman. Shop our collection today!



Discover the perfect women clothing brand that combines style and quality. Where we are committed to providing excellence and elegance in ladies wear suits. Enhance your wardrobe with our wide range of trendy clothes designed for any kind of event. Shop now to get the latest designs.



Shop the latest collection of slippers for ladies online at ECS. Discover the newest collection of stylish and trendy women's slippers online at the best prices. Find the perfect addition to your wardrobe.



Discover a wide range of the ordinary niacinamide, including The Ordinary Serum and The Ordinary Niacinamide serum, at Chahyay. Shop now for all your skincare needs.



Explore our online shop to get the best sports wear for your active lifestyle. We have everything you need, from stylish training clothing to cozy athletic wear. Shop our stylish and high quality sportswear collection now to boost your performance.



Are you looking for sale on brands in Pakistan? So come to Jazmin and get a sale on the latest dresses in all over Pakistan with fast delivery. Do not miss out on this opportunity to update your wardrobe with our massive collection. Shop Now!



Explore the [best local skincare brand](https://joinherbeauty.com/), Her Beauty. Experience top quality products crafted with love and expertise for your ultimate skincare routine.



Transform your skin with our range of high-quality glass skin products. Discover the secret to achieving a flawless and radiant face with Her Beauty.


Deleted comment

Explore the top Women Clothing Brands in terms of design, craftsmanship, and price. Shop now for classic dress and on-trend styles. Today, update your wardrobe with the best women's fashion brand!



Get ready to experience the floral beauty of House of Flowers! Our flower shops in Lahore offer a wide selection of stunning blooms and arrangements to suit any occasion. From classic roses to unique and exotic flowers, you're sure to find something special for your special someone. With our prompt delivery service, you can have your desired bouquet delivered right to their doorstep in no time. Shop with us today and enjoy the beauty that only House of Flowers can provide!



Shop for the latest collection of women shoes at Borjan. Find the perfect pair of shoes to complete your look.



Hang Ten offers a wide range of trendy and stylish trousers for women. Explore our collection of ladies trousers and find the perfect fit for your wardrobe.



Discover and shop the latest trends in gym dress for ladies at Nayza. Find stylish and comfortable gym dresses, fitness wear, and more to elevate your workout wardrobe.



Find the perfect chiffon dresses for any occasion at Ramsha. Our collection offers a wide range of stylish and elegant options to suit your unique style. Shop now and elevate your wardrobe.



Get ready for summer with Mohagni's latest dresses! Our new summer dress design features a stylish cut and comfortable fabric that is ideal for any occasion. Order your favorite dress and embrace the summer season in style.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(