No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Use API Laravel in the quasar mobile application

    Framework
    2
    2
    276
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      devspo last edited by

      There is an application for quasar. I’m building an app for android.
      The backend on the laravel. I indicate in the quasar settings

      devServer: {
      open: true, // opens browser window automatically
      proxy: {
      ‘/ api’: {
      target: ‘http: // domain_name’,
      changeOrigin: true
      // pathRewrite: {
      // ‘^ / api’: ‘’
      //}
      }
      }
      }

      I copy the resulting application to a smartphone, the login and password input window is displayed, but the router does not work, more precisely, I assume that the action in vuex does not work:

      axios.post (’/ api / auth / login’, {
      login: login,
      clientID: clientID + ‘’,
      key: key + ‘’
      })

      I have an assumption that the links to api must be indicated somehow differently so that they work in a mobile application.

      Help me figure out how to make applications that have a frontend on a quasar and a backend on laravel.

      metalsadman 1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman @devspo last edited by metalsadman

        @devspo you are taking that example wrong, it’s for when you use a spa frontend along with your backend on same domain, which in mobile shouldn’t work since your app is served within your mobile phone via file://. now if you want to communicate with your backend then you’ll have to supply a full url in the url params of an axios function, or use a baseUrl in your axios setup. pls head to axios docs to learn more on how to do that.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post