updated: 2021/5/15
sudo update-alternatives --config php
で上記例では0~4で使いたいバージョンを指定してエンター
参考:
- sudo composer self-update
- sudo composer global require 'laravel/installer'
- export PATH=~/.composer/vendor/bin:$PATH
- nvm install stable → nodeをupdateしないとlaravel mixでerror
- nvm alias default [最新version](インストールされた最新のnodeのversionをdefaultに指定)
- npm install npm@latest -g
laravel new PROJECT_NAEM
sudo nano /etc/apache2/sites-enabled/001-cloud9.conf
→→ ...workspace/PROJECT_NAME/publicにindexを編集
databaseのsetting →これをしないとphp artisan migrateでerror
- Add the following to the app/Providers/AppServiceProvider boot method:
Schema::defaultStringLength(191);
- Don't forget to include the following at the top of the file:
use Illuminate\Support\Facades\Schema;
- resources/assets/js/app.jsに以下を加筆(laravel mixでのエラー回避のため)
______________________________________________________________
window.$ = window.jQuery = require('jquery');
window.Laravel = { csrfToken: $('meta[name=csrf-token]').attr("content") };
require('/bootstrap');
______________________________________________________________
参考:
composer使用時に
cannnot create cache directoryが表示されたら
sudo chown -R $USER $HOME/.composer
参考:
追記:
pusher を使うならcurlをインストール
sudo apt-get install php7.1-curl
参考:
Cloud9 で Laravel(v5.5.0) をインストールして Dusk を動かす方法 – OBOEGAKI