Laravel 5 + WordPress: routes using the laravel front-end - wordpress

I'm working in a project based on Laravel 5 and my users will have their own pages: domain.com/user-page-slug (Route: /{user-page-slug}
After the user login in the system he will have the settings related to my project but I'm planning to give him the WordPress back-end then they can update their own pages and posts and for the front-end (using the route above) I want to render the WordPress theme selected.
For the rest of the system I'll use Laravel.
Do you know if it is possible?

Related

How to convert Wordpress Rental web to flutter app

I have a WordPress website that shows listing of some properties(Ad space) I don't have any idea how WordPress work i want to show that listing in my flutter app, how can I find that API which shows data in WordPress web
Wordpress web Theme using rental hive theme and I also see some plugins in wordpress like json api & JWT Auth

Has anyone used Auth0 wordpress plugin to gate a page (or full site) vs the backend of wp?

I am attempting to use the Auth0 wordpress plugin to authenticate users from another app (that uses Auth0) into a wordpress knowledge base. I am running into issues configuring and can only seem to get it to protect the back end of Wordpress instead of the front end site.
ie. when a use clicks from our authenticated App (not wordpress) into the docs space (wordpress site on subdomain), we would like them to have to click through the SSO gate before loading the docs page.

How to Create a WordPress Laravel-Based Plugin

I need to create a WordPress plugin. This plugin is actually a Laravel project. Why I would do that? because we are making a mobile eCommerce application and we have already a WordPress website for the company we are creating the mobile application for, so we need to plug-in the WooCommerce to the WordPress website then exposing some REST APIs to the mobile application (i.e., getting products on sale, placing orders, creating a new customer etc.). In case anyone answer will be that WooCommerce having its own REST APIs, unfortunately it won't work as it requires oAuth 1.0a as its authentication method when requests comes from a remote client, not the same machine, and the mobile app will be created using Ionic 4 and Angular 5/6 and they do not support oAuth 1.0a.
I tried to create a WordPress plugin using the standard way by downloading the laravel project at the WordPress plugins folder and I created a plugin file within the laravel root directory and within it I referenced the server.php file in the same directory which is responsible for initiating the composer auto-loader and then bootstrapping the laravel, however, it did not work for me!!! I also tried a package laraish
However, when I created a simple hello world route it does not respond!

Mixing Wordpress eCommerce site with external login based Vue Frontend Best Practices

I am new to web development and and would like advice about what is the usual best practices to achieve what I am trying to do.
I am in charge of writing a frontend app using Vue. This frontend will require a login to access the app. The app will be hosted on Amazon.
However we are also wanting to build an eCommerce site in Wordpress or equivalent that sits on the root of the website, (eg www.mywebsite.com) with the app accessible through a "sign in" button. If the user presses the sign in button we want the location bar location to not change from the website they are on (www.mywebsite.com), even though the Wordpress site and Vue frontend may be stored on different locations/domains.
If the site is made in Wordpress, we can get another developer to do that webpage for us, while I work on the frontend. However we want the experience to be relatively seamless between connecting to the wordpress root site, clicking on the sign in button and being taken to the Vue frontend.
Is this possible? Do both sites have to be hosted on the same server for it to work (eg an Amazon EC2 server which hosts two webpages, the wordpress one and the vue one)?
Or can the wordpress put a link to the Vue frontend which doesn't change the web location to the user?
Or (worst case scenario) do we need to make both webpages in Vue as one Vue application, some pages requiring login to access and others not?
Thanks kindly for any assistance.
So in order to use Vue and WordPress together, you can either write 2 separate applications. One for the Frontend and one for the Backend, which is perfectly fine or you can simply write a WordPress Application with a Vue Theme.
This is how this could look like:
WordPress Backend
You can use a normal WordPress backend, where you can build the architecture you want to. In addition, you need to set up the REST-API Wordpress provides. So this also means, just use plugins which support it. Otherwise, you would need to write custom endpoints. For example, Woocommerce would be a good e-commerce plugin, since it supports the API.
Learn more about it here: https://v2.wp-api.org/
Of course, you can host your WordPress installation on Amazon. Here is a good guide for that: https://aws.amazon.com/de/getting-started/tutorials/launch-a-wordpress-website/
Notice: The REST-API is available in core since 4.7. If you are using an older version you would need to install a plugin.
WordPress Frontend
In order to create your Frontend, I'd recommend you to make a custom theme. Since you are just serving static files this can be done pretty easy. But still, you don't need to reinvent the wheel.
There's a really good starter theme out there: https://github.com/EvanAgee/vuejs-wordpress-theme-starter
It comes with all the stuff you need to get started and since it is just a theme, you can simply set up a usual WordPress hosting without handling Domains of multiple applications.
In order to get the data from the Backend, you would simply make calls to the REST-API. Here's an example: https://github.com/EvanAgee/vuejs-wordpress-theme-starter/blob/master/src/api/index.js

How to get wordpress blog in drupal 7 homepage

I have a website in drupal 7. How to place wordpress blog feed inside a block in drupal 7. website is in drupal domain and blog is in wordpress domain.
Currently I have both a Drupal and a WordPress site. Is there a module that can display the latest posts from my WordPress site in drupal block?
Several way available :
1 - Create a flux (rss , xml) and aggregate it with Feeds module or custom module (recommanded)
2 - Create service on wordpress to provide information to drupal. Custom module needed (a lot of development but handled easy)
3 - Create a listing page on wordpress and use it on drupal with an iframe (but it's not a safe way)
For all these way , you have to create a block displayed on homepage (custom module or via administration)
You can transfer just raw data (i.e JSON array) and then build html out of it on Drupal side. Or you can create full HTML from WP site, save a file somewhere where Drupal can access it and move file to Drupal site. In both cases do the transfer periodically, time to time (within a cron call) - don't do it for every usage (page view on Drupal side).

Resources