Install Laravel in Linux via Xampp

Hello there today I'm here to explain how you can install Laravel in your Linux system via Xampp.
First thing first you have to remove the common PHP from your Linux system. I'm here using Ubuntu but it works in all Linux systems.
sudo apt-get remove php-common
After this, you have to update & upgrade your Linux system to fix the bugs
sudo apt update && apt upgrade -y
https://www.apachefriends.org/download.html Now go on this website & download the latest version of xampp for Linux.

Once the download is completed you have to open the terminal & run the following commands
cd Downloads
sudo chmod +x xampp-verison-installer.run
sudo ./xampp-verison-installer.run
Now complete the setup
Once you complete the setup of xampp in your system
its installed in /opt/lampp directory
For now, we are ignoring the start the lampp & registering the php path in Linux system as a common PHP
to register you have to run the following commands
cd ~
sudo gedit /etc/environment
after run that command you got the window now put the code in in the path
:/opt/lampp/bin/php
now save the file & exit.
sudo ln -s /opt/lampp/bin/php /usr/local/bin/php
Here the registration is completed for check you have to open the new terminal & type the php -v & its done.
Now it's about to install Composer
To install composer run the following commands
curl https://getcomposer.org/installer | php
if you have any error-related curl then you have to install curl in your system
for installing the curl you have to run the following command.
sudo apt install curl
Now re-run the command
curl https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
All things are done here but in some systems, you will get the error when you are trying to install Laravel in your system called mkdir permission denied().
to solve that error you have to run the following commands
cd ~
chown -v yourusername /opt/lampp/htdocs
Now good to go & try to install the Laravel project
Hopefully, this will work for you if you have any doubts connect me on Instagram or Linked