Are you getting errors in the laravel command not found after installing the Laravel installer using Composer on the Linux system?
The Laravel installation was successful and no errors were encountered, but maybe you faced an issue when attempting to create a new project using the command “laravel new {project-name}”.
$ laravel new example-app
It did not work properly. I searched for a solution on Google and found one that may be helpful. You can try it out.
Step 1:
Open terminal/cmd from the start panel.
Step 2:
Locate the home/{name_of_user_directory} folder in the terminal using the cd command.
Step 3:
Run the “sudo nano .bashrc” command to edit the file.
$ sudo nano .bashrc
Step 4:
Add below the line at the end of the file.
$ export PATH=”$PATH:$HOME/.config/composer/vendor/bin
Step 5:
Press CLT + X to exit and save the file.
Press Y for the “Save modified buffer?”
Hit Enter without changing the name.
Close the terminal open a new one and type laravel -v
$ laravel -v
If it still doesn’t work, please reach out to us. We are happy to help you.