How to fix Laravel not found after running composer global require laravel/installer

The issue you're encountering is likely due to the global Composer bin directory not being added to your system's PATH. Here are the steps to resolve this:
-
Find the Composer global bin directory:
composer global config bin-dir --absolute # Output: /home/your-username/.config/composer/vendor/bin
-
Edit the shell configuration file:
nano ~/.bashrc
-
Add the directory to the PATH:
export PATH="$PATH:/home/your-username/.config/composer/vendor/bin"
-
Apply the changes:
source ~/.bashrc
-
Verify the installation:
laravel new my-application