Support the ongoing development of Laravel.io →
posted 1 year ago
Last updated by @jbiddulph 1 year 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!

Eventy

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.

© 2024 Laravel.io - All rights reserved.