Deploy Laraval App on Google Cloud Platform - Questions - laravel

I am new here and new to Laravel, sorry if I am posting in the wrong place or if I should ask it in another place. I have a Laravel application I want to deploy on Google Cloud Platform - App Engine. However I want a setup with a landing page and the laravel app in a different directory, so I can have something like mydomain.com poiting for my landing page and dashboard.mydomain.com poiting to my Laravel app. How is the best approach to make it:
1 - Two Laravel apps one for the landing page and one for the dashboard application in a subdirectory?
2 - A simple static html landing in the main directory and the laravel dashboard appication in a subdirectory?
3 - Two separeted google cloud platform projects, one for the landing page and the other for the dashboard app?
I have no idea how is the best and professional method of doing it here. I really appreciate some opinions here.

Related

Vue and Laravel separate app - Need feedback on architecture

I need a bit of expert feedback on this please as I do not want to start my project in the wrong way.
I would like to keep my Vue code separated from Laravel, the reason being, I may use this vue app later on on Cordova.
First question:
I understand how to host the Laravel API and Vue app on 2 different domains, no problems at all but I am unsure on how to setup the folder when both apps are on the same domain.
I know that Laravel should be hosted below the public_html folder and have a symlink to the public folder for security purpose. But where should my vue app goes?
Second question:
When I save images from Vue(as I am creating a blog) the images are going to the Laravel store/images folder, so each time I want to show an article in my vue app, the API must each time request the content(text and images) from the Laravel API, is this fine? Will the Google bot be able to trigger the API request when requesting the content?(I actually never thought of this...)
Thank you so much!

SEO for Laravel Vue.js App

My Laravel 5.6 app has a Vue.js frontend. The Vue.js app is in the resources directory. I have gone through several articles that use Prerender SPA plugins. These articles are for the stand alone vue.js app and have an index.html file. In Laravel's case we have index.php. How do I make my Laravel Vue.js App SEO freindly. At a minimum I would like to make the front/home page of the app SEO friendly.
I think, as an alternative solution, you can use https://prerender.io/ service (up to 250 pages Free for caching) to do the pre-rendering for your SPA application.
If you are going to implement https://prerender.io/ service, you would require to generate all the sitemap URL paths and upload them to this service via their npm plugin (prerender-spa-plugin) and configure your .htaccess file for search engine crawlers. So search engine crawlers will redirect to this pre-render service and picked your website, cached static web page for service engine indexing, and show that cached page as the search result.
For more info, you can refer below;
https://prerender.io/documentation
https://snipcart.com/blog/vue-js-seo-prerender-example
Cheers!
Definitely recommend checking out Nuxt.js! It is a production-ready framework built on top of VueJS. With Nuxt.js You can create 100% SEO-friendly app with SPA-like routing.
Check this awesome Toptal article about "Creating Server-side Rendered Vue.js Apps Using Nuxt.js"

Laravel + Angular 4

I want to create some project and use there Laravel as API and Angular 4 to represent my site.
Since I have no money for experiments, I found hostinger.co.uk where I can set up php framework and do that I need.
I started configuring Laravel and get confused - where to place my site on angular? I'll have the only one site address. So I'd like to make it combined, because I need Laravel the only for working with DB.
Best practice would be to keep api & frontend seperate.
If you insist on using single domain, such as example.com you can use subdomain api.example.com for API, and main domain for presenting your site.
On a shared hosting you can place folders something like these:
/api -- laravel installation(with subdomain api.example.com)
<angular build files>
index.php
script.bundle.js
style.bundle.js
etc.
......
.....
.....
.....
For development you can keep your angular files anywhere on your local system, and upload only build distribution to the main domain.

uploading files from one domain to another in laravel 5

I am kinda stuck in my laravel 5.2 application (I'm actually a newbie in Laravel). I am working on a project with both front and back ends. The two ends are hosted on two different domains (frontend on the main domain and backend on a subdomain). The problem is, am trying to upload files (images) from the backend on the subdomain to a folder on the main domain. I have made extensive research on how to do this to no avail. Hoping to get assisted. Thanks.
Try to make the upload form on the same server that the request is procesed and try to include the form on the other server using an iframe or something similar.

How to separating frontend and backend using codeigniter

I am a new php developer. Am developing my website using codeigniter and got stuck when i tried to make the backend. Am using CMS backend that comes with its own folder with everything (.htaccess, its own MVC etc) so I put all my frontend folders into one folder called frontend withinn the application folder but now I cannt view my frontend pages. I get this: The configuration file does not exist. Please help me step by step.
check out this link to know the MVC pattern Codeigniter.
controller and model ----- Backend
Views --- Frontend

Resources