設定 laravel 執行檔的路徑 以便日後使用
安裝完成 laravel 之後,laravel 的執行檔會在家目錄下的 .composer/vender/bin/ 的資料夾裏,所以,預設要執行 laravel 時,就要 .composer/vender/bin/laravel 才能執行,當然不能搞到這麼麻煩,所以,再來調整一下。
工作環境:
Windows 10 + virtualbox
guest: ubuntu 18 server
composer global
laravel global
$vim .bashrc
在檔案最後方加上一行,真正的路徑請依你的實際狀況調整
export PATH="$PATH:$HOME/.composer/vendor/bin"
$source .bashrc
此時
$laravel
會輸出
Laravel Installer 2.0.1
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
new Create a new Laravel application.
成功了
收工!
工作環境:
Windows 10 + virtualbox
guest: ubuntu 18 server
composer global
laravel global
$vim .bashrc
在檔案最後方加上一行,真正的路徑請依你的實際狀況調整
export PATH="$PATH:$HOME/.composer/vendor/bin"
$source .bashrc
此時
$laravel
會輸出
Laravel Installer 2.0.1
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
new Create a new Laravel application.
成功了
收工!
留言
張貼留言