2

So I installed laravel on my server. Now I added the path using:

sudo PATH=$PATH:~/.composer/vendor/bin

Now laravel command works fine for root/sudo users but not for normal users. I want normal users to be able to use the command as well. Currently it's not found at all(as a normal user)

laravel: command not found

Is there a way to give all users access(or users with the group laravel for example)

I'm running UBUNTU 14.04

2
  • The command is artisan not laravel. Commented Dec 24, 2014 at 1:06
  • @user3117036 I do use the laravel command for example for creating a new project etc. Commented Dec 24, 2014 at 1:08

3 Answers 3

3

You want to symbolically link the executable into the system user's default $PATH. The most appropriate place to link it is in /usr/local/bin. You can create the link like so:

$ sudo ln -s /full/path/.composer/vendor/bin/laravel /usr/local/bin/laravel

Note: This will not allow users to execute laravel if they do not have sufficient privileges to do so.

Sign up to request clarification or add additional context in comments.

Comments

1

To add path, you don't need to use sudo. Just do it as normal user, ~$PATH=$PATH:~/.... or just edit ~.profile and add it to make it permanent so that when you login again, you won't need to repeat

2 Comments

I tried adding path as normal user but I'm still getting laravel: command not found.
Why not put in the the user bash profile. And relogin
0

Try to get a Laravel Development Environment through pre-installed composer:

Type the following command on your command shell:

composer global require "laravel/installer=~1.1"

Then on typing 'which composer' can get you the path: On my system it is :

C:\Users\user\AppData\Roaming\Composer\vendor\bin

After getting the path,copy the path and cd into it through your command shell: Then type:

laravel new project

A new laravel development environment will be set up. You can see a new folder created once you visit that path.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.