Hello guys I have been deploying Laravel applications on the server for a while, I have just created a SPA(Single Page App) Laravel + Vuejs how do I deploy it ? Just like normal laravel app or I need separate Frontend(Vuejs) and Backend (Laravel) instances ?
It is same as regular laravel app deployment.
run npm run production and after that make whole project as zip and put it on serve and just follow the steps as regular laravel project.
I need to make laravel redirect to an Angular route.
I'm deploying my first project using Angular7 for front & laravel 5.8 for the API and it works fine in development. However when I build the Angular project and locate it in the public directory of laravel so that I can access it by http://127.0.0.1:8000/<my project name> angular route doesn't work if I request a specific link like http://127.0.0.1:8000/<my project name>/view/data/45. In this case laravel returns 404 response since this is Angular's route not laravel.
fixed it by adding a new route to Laravel routes which redirect whatever it got to the index page of Angular and added the <router-outlet></router-outlet> to my index.html page
Any help would be really appropriated on how to achieve this.
I have currently three separate applications, two front-ends running with vue.js and one backend app, with laravel tenancy, only serving API's, no front-end.
The main base URL or the backend url is set to example.com, this is the tenancy application. It auto-generate URL subdomain.example.com for tenants & databases, as the tenancy package works.
Another domain setup for secure.example.com that points to the another vue application, where we register. Works perfectly well.
Now I have a third application on vue.js, for the tenant's, that points to anything to *.example.com,
and the way the tenancy works, is that wildcards & directory must be set to the main application where tenancy is installed, for the tenancy to work with subdomains.
I cannot create *.example.com & point it to the vue application, as the API calls, then go to vue application not to the back-end, as the sub-domain *.example points to vue application
The whole point is to separate the Tenant UI entirely using a frontend framework like vue.js from the back-end.
Im using Quasar separated from the Laravel Api, with the Hyn Multitenant package..
brightmind-erp.com
demo.brightmind-erp.com
In public/panel from Laravel public folder I'm inserting the dist assets from Quasar, and redirecting '/' calls to that route where Vue Router enters in action:
Route::get('/', function() {
return redirect()->route('frontend');
});
// Route everything else to Vue
Route::get('panel/{any?}', function () {
return file_get_contents(public_path().'/panel/index.html');
})->where('any', '.*')->name('frontend');
If you're using Webpack you have to configure it to find the Vue assets from (in this case) '/panel' folder....
I fought with a lot of tutorials to configure .htaccess file or nginx config to make the api work in '/api' route and vue in '/' but I couldn't
Let me explain myself better. I have a website created with CodeIgniter and I am trying to add another project created in Laravel that I want to be accessible by subdomain.
How can I proceed about this? How can I establish the subdomain routing in CodeIgniter to be able to point to the Laravel project?
Nothing to do with Laravel or CodeIgniter routing,
If you set the Laravel app in subdomain, just call the url to that domain from CodeIgniter.
I want to create a config file on my nginx vps to handle 2 laravel apps. I don’t own any domain name.
What I want is:
http://my_ip/app1 will resolve to the first app
http://my_ip/app2 will resolve to the second app
and if anyone tries to access the root http://my_ip/ to show a 503 or a custom html file.