Install new copy of Laravel

Install new copy of Laravel

 

Install Composer

1. Go to the Root command prompt and execute the below commands

# sudo apt update

# sudo apt install curl php-cli php-mbstring git unzip

# sudo php composer-setup.php –install-dir=/usr/local/bin –filename=composer

To test your installation, run:
# composer

Install Laravel from composer

A) Make sure you have the latest Laravel installer:

# composer global require laravel/installer

B) Add composer bin folder to your $PATH:

Edit your .bashrc: gedit $HOME/.bashrc

Add the following line: export PATH=”$PATH:$HOME/.config/composer/vendor/bin”

C) Use the source command to force Ubuntu to reload your .bashrc:

# source $HOME/.bashrc

D) Try to output Laravel installer’s version:

# laravel -V

Change the Prompt where you want to install laravel

# laravel new newBlog

Start the development server
# php artisan serve

Output:
http://localhost:8000:

To Check on Browser

http://<Public IP>/newBlog/public

Error: Laravel “Your requirements could not be resolved to an installable set of packages.”
# sudo apt-get install php-xml

Please follow and like us:
0

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.