Support the ongoing development of Laravel.io →
posted 4 weeks ago
Last updated by @jbiddulph 4 weeks ago.
0

anyone? please

0

Hi, Can you please elaborate on your question?

0

when I select a course in Spanish, ES is passed into the query params but I would like to use that in my object to show ES, not EN

0

Can you share the code snippet?

0
async fetchCourses() {
      const courseResponse = await axios.get(
        `http://127.0.0.1:8000/api/course/${this.$route.params.lang}/${this.$route.params.course}`
      );
      let courselang = courseResponse.data + this.$route.params.lang;

      console.log("courselang: " + courselang);
      this.coursesuite = courseResponse.data.en.config.coursesuite;
      this.coursename = courseResponse.data.en.config.coursename;
      this.courseid = courseResponse.data.en.config.courseid;
      this.lms = courseResponse.data.en.config.lms;
      this.defaultlang = courseResponse.data.en.config.defaultlang;
      console.log("HERE I AM: ", courseResponse.data.en.config.coursesuite);
    },
0

can anyone help here please

0

Sorry, I am not able to help you.

0

Sign in to participate in this thread!

LoadForge

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 Laravel.io - All rights reserved.