PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, February 9, 2022

[FIXED] How to make laravel run automatically each time I open a new terminal?

 February 09, 2022     composer-php, laravel, php, ubuntu     No comments   

Issue

I came from windows to Ubuntu and tried to install laravel following link https://laravel.com/docs/5.0 I ended with the installer 1.4.... I don't recall which one so I decided to use

composer global require "laravel/installer" 

I ended with the installer 4.1.1 but if I close the terminal and open it again and run laravel it does not find the command. I found the following command searching for a solution PATH="~/.config/composer/vendor/bin:$PATH" I have to run this each time for the laravel command to work. Is there a permanent solution? I'm new to linux and I'm having so many issues and could not find a solution. I plan to update laravel but I cannot even get this running properly.


Solution

You can include export PATH="~/.config/composer/vendor/bin:$PATH" in your ~/.bashrc file at the end and save it.

Then you can either run source ~/.bashrc or close and reopen the terminal.

All paths written in ~/.bashrc will be read each time you open a terminal no need to set the path for each terminal session.



Answered By - Donkarnash
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing