iam using AWS for hosting Laravel app in elastic beanstalk behind a load balancer,
i want to host my vue js app separately, i tried to use S3 , the routing didnt work (when i refreshed the page, it stopped working)
is there any solution with good performance to host vue js separate from Laravel Apis?
thank you
Related
I have a Strapi backend hosted at heroku.
I'm hosting the frontend on Netlify. Which is a React App.
The env var on netlify is a link to the backend on heroku so that I can get data from strapi. All this work on dev build.
But when I spin up the site on Netlify. Netlify adds the Netlify link to the post or get requests like this https://unrivaled-pixie-6fa040.netlify.app/%22https://frozen-everglades-98.herokuapp.com/api/%22auth/local
and I only want the last one: "https://frozen-ades-98.herokuapp.com/api/auth/local
Anyone that knows more about this then me?
I am new to Laravel.
I am developing an application which is going to be an Web (laravel8 + vue.js) + Mobile App (Android).
Application has both backend and frontend on both web and mobile app.
Which means I need routes for web application to manage backend and frontend and API routes to manage same.
So, I was thinking how I should structure my code in Laravel to reduce code redundancy and what is best approach to plan my project DIR structure, routes etc.
Thanks.
I suggest you take a look at and consider using Laravel Breeze or Laravel Jetstream with the Interia.js & Vue.js stack. Here is the info: https://laravel.com/docs/8.x/starter-kits.
While both of these kits come with Inertia.js (Breeze only if you include it during installation), you don't have to use it and can use Axios or whatever you prefer.
These kits offer scaffolding with the routes, controllers, and views you need to register and authenticate your application's users and you should be able to easily build you API on top of either for the mobile app.
I used to use this:
Project
--routes
----api.php => you have API router here
----web.php => your web router
--views
----create-product.blade.php => then call to vue component
--vue
--create-product.vue
How does Inertia.js connects my Laravel backend on a domain with my Vue.js project on another domain ?
Or am I trying to do something Inertia.js is not made for ?
you answered your own question - Inertia is not for splitting the frontend from your backend. It's meant to couple the backend and frontend just like if you were to use blade.
From https://inertiajs.com:
Build single-page apps, without building an API.
Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
I have already developed 2 applications and I want to deploy my first application which contains Vue Cli and Laravel Php framework on the main domain and the other application similarly made with Vue and Laravel in my subdomain. Please, could you suggest to me how could I perform these actions? Thanks
I want to built web site in Laravel and Vuejs. All things are good, but When I use router-view in dashboard it brings all components from webpage. Please help me!
How I can use two template one for website and one for admin dashboard in laravel and vuejs application