Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save klzchz/630a5f494260ac7086d0b09dfd49d05a to your computer and use it in GitHub Desktop.

Select an option

Save klzchz/630a5f494260ac7086d0b09dfd49d05a to your computer and use it in GitHub Desktop.
How to install Laravel globally in Ubuntu

How to install Laravel globally in Ubuntu

===================================================================

Open your terminal using Ctrl+Alt+T and type the following commands

Step 1: Install Laravel

composer global require "laravel/installer"

Step 2: Add composer to path .bashrc file to access laravel globally

cd
sudo nano .bashrc

Edit environment config file and add this line

export PATH="$PATH:$HOME/.config/composer/vendor/bin"

Reload config path

source ~/.bashrc

Step 3: Create a new Laravel application

laravel new blog

Step 4: Install missing packages and their dependencies

cd blog
composer install

Step 5: Test the application

php artisan serve

Open a web browser and visit localhost:8000 to see the laravel welcome page

Step 6: Stop server

Terminate php server in terminal by pressing Ctrl+C

Thus you have successfully installed laravel globally.

@InerkyJad

Copy link
Copy Markdown

Thank you ๐Ÿ™Œ

@aymantoumi

Copy link
Copy Markdown

thank you, I appreciate it.

@CarbabouSy

Copy link
Copy Markdown

thank you, I appreciate it and it help more

@BaddyM

BaddyM commented Oct 27, 2023

Copy link
Copy Markdown

This is amazing

@kaung-zaw-hein

Copy link
Copy Markdown

thank you so much

@daniels-martins

Copy link
Copy Markdown

Thanks

@designatedcoder

Copy link
Copy Markdown

legend!๐Ÿ™Œ

@ryanmmbale

Copy link
Copy Markdown

This is amazing, thank you.

@Raza9798

Raza9798 commented Jul 1, 2024

Copy link
Copy Markdown

useful

@brcmesquita

Copy link
Copy Markdown

Thank you!!!!!!

@AlbertBeweb

Copy link
Copy Markdown

Thanks ;)

@vinitpatil-jabsainfotech

Copy link
Copy Markdown

yup ..problem is solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment