Installing Laravel 5.5 On CodeAnywhere
CodeAnywhere is a great cloud IDE to create web apps but it lacks that latest install of Laravel. So I used the latest PHP stack as my base and then installed the latest version of Laravel 5.5 with additional packages.
Basic Steps to Install Laravel 5.5
- Create a new Container (Hook up a Bitbucket or GitHub repo first if there is an existing repo) use the PHP7 CentOS Stack
- Once container is loaded update composer:
- Then install Laravel on the root of workspace:
composer create-project laravel/laravel basicwebsite
- Install Nano editor:
sudo yum install nano
- Edit Document Root on Apache http config file:
sudo nano /etc/httpd/conf/httpd.conf
- Scroll down a ways to the section where it says Document Root: change that to
- You can also change working directory to:
- Save changes from the last two steps and exit.
- Restart apache:
sudo apachectl restart
- Change permission of storage directories:
chmod -R ugo+rw storage/and
chmod -R ugo+rw bootstrap/cache/
- You can save this container as a template stack for other future containers.
- Now your Laravel 5.5 app should work. Happy Coding!
Optional: Installing Node/NPM
Furthermore, it may be desirable to install node to compile your laravel assets. Here’s the steps I took to do just that.
- Follow this NVM Guide to install Node
- use this curl command:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
- install node:
nvm install node
cdin the laravel project directory and run
- Then you can run
npm run watchwhich will start a live server that will be constantly monitoring for any changes to the project sass and js files and update your site accordingly