today I have two similar Laravel projects, they are exactly the same except for the Laravel version, the first is running on 5.5, and the second is the updated version running on Laravel 9. The Laravel 9 one is not in production because we need a way to test it and check if everything is working after the update. My question is if there's a way to redirect to some clients only the newer version. The projects for the clients are exactly the same.
In conclusion I need a way to show to like 20% of the clients the newer version, and the older version for the other 80%, is possible to do this? Is there a better way to test the newer project for errors?
Thanks in advance.
You can use a Content Delivery Network e.g Cloudflare or something like AWS' CloudFront. You will be able to then configure the quota's in terms of where the relevant traffic will be redirected to.
Here is a link to an article on Cloudflare
and another one on AWS
You can also check with your host on how to configure a similar setup.
All the best
This question already has answers here:
Docker in MacOs is very slow
(9 answers)
Closed 2 years ago.
I am following this tutorial (https://tighten.co/blog/converting-a-legacy-app-to-laravel/) to migrate a legacy app to Laravel and have made it as far as the "Spring Cleaning" section. My legacy code is in a legacy directory inside my Laravel build.
Our development environment uses Docker Compose to build a container on the host machine (which in my case is a Mac but can be either Windows or Linux as well depending on the developer). The source code is in a volume mounted to the container so that the developer's updates can be seen in the browser as soon as the developer reloads the page.
When I go to get Laravel to load it's default route (the basic route that Laravel builds with) I get page load times in excess of 6 minutes.
I have tried using cached volumes like so: ./:/var/www/portal/:cached
I have also tried following this tutorial (https://www.jeffgeerling.com/blog/2020/revisiting-docker-macs-performance-nfs-volumes) for using an NFS mount. I got it working but the page load size was still over 6 minutes for the default page.
What is causing this extremely slow page-load time? How are Dockerized Laravel Development Environments supposed to be structured to avoid this issue with Docker's VM on Mac and Windows?
I didn't have this problem when developing just in the legacy app. I'm not inclined to think that Laravel itself is causing so large a slowdown. My thought is that it is the Docker VM running on Mac but I haven't been able to prove that yet.
Docker on OS X is just slow. Newer Docker versions have improved this.
Are you actually deploying this Dockerized? If not, consider just using artisan serve.
I am currently learning frameworks in php. I decided to try laravel.
i have tried its installation and routing example. while next step it says homestead installation instructions over there. It looks like any virtual machine to be installed . homestead description link
I want to know is it compulsory laravel should be use with homestead?
if i don't use is there any effects on my code efficiency or performance?
Homestead is not compulsory. You can run Laravel with any common web server as long as you hit the proper requirements.
But Homestead does greatly ease the difficulty of having to setup a development environment, and it also lets you closely mimic your production server as to make the whole Download->Develop->Deploy process seamless.
Laravel Forge is a service that lets you manage your servers and set them up in such a way that almost mirrors Homestead. To See more, Go to the Laravel Forge Homepage
Can Laravel and Cakephp work on the same WAMP configuration? I have one running project in Cakephp but starting a new project in Laravel now.
I am having problems in configuring composer and having laravel up and running. Now, My localhost is completely messed up. So, before proceeding to fix the problem, I wanted to confirm if Cakephp and Laravel work simultaneously from same WAMP path?
I am trying to deploy my first Laravel App. So I hope I am providing all the necessary info. I have walked down several paths trying to deploy this app. I tried a shared hosting account, but found too many errors to continue deploying my Laravel app. In the meantime, someone has said to me I need a VPS, so I may go with that.
So with a new VPS, I now am trying to install the following: phpMyAdmin, node.js, Composer, and Laravel 4. These are the technologies I am using on my local server with MAMP. Now after being overwhelmed with the information on installing each on a VPS, I have found myself extremely confused. Some places say I need to install Ubuntu. Some say I need to install Apache first. Some talk about using CentOS. I honestly have no idea what I need to install, and in what order. All I really need is to figure out how to set up a PHP environment on my VPS with phpMyAdmin, Node.js, and Composer. After that I am pretty sure it's all straight forward, as far as installing my app.
I also saw some one talking about committing my app to Git, and the cloning it to the VPS. If I did this, I would still need to set up the environment correct? Once again, I hope I have provided the necessary information. If my question is not clear, could you please refer me to a resource that I can study.
You don't need install Laravel separately from the app it is part of - these days a PHP app just contains everything it needs in its vendor folder. How to deploy depends on how you have arranged your dependencies locally, but the simplest way is to copy everything in your local project to your remote server (FTP or rsync). I don't think Laravel demands a VPS, but if you are using Node as well, then yes you will.
So, the short answer is: if it works locally, copy it up to the remote host, and it should work there. Make sure you've set up your config system in your app so that it can cope with the different settings you need in local/remote environments, such as database connection settings.
My feeling is that a shared host would be easier for you as a beginner - is the Node.js component of your app critical? Running your own VPS is not difficult, but there is quite a bit to learn. Your distro (such as Ubuntu) would be ready-installed, and on top of that you would use the package system (something like apt-get) to install Apache, PHP, PHP modules, phpMyAdmin, git, and whatever else you need.
Yes, you can certainly deploy using Git. One way to do this is to create bare repositories on your server in a private place, set it up as a remote in your local dev machine, and push to it as your off-site copy. Then, from your dev or production web folders, pull and update submodules. This is not trivial, and requires at least a working knowledge of Git - so presently I wouldn't recommend this route.