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.
Here are the steps I followed:
- Create a new Container (Hook up bitbucket or GitHub repo first if there is an existing repo) use the PHP7 CentOS Stack
- Once container is loaded update composer:
composer self-update
- 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
“home/cabox/workspace/basicwebsite/public”
. You can also change working directory to:“home/cabox/workspace/basicwebsite/”
. Save changes and exit. - Restart apache:
sudo apachectl restart
- Change permission of storage directory:
chmod -R ugo+rw storage/
andchmod -R ugo+rw bootstrap/cache/
- You can save this container as a template stack for other future containers.
- Now your app should be working. Enjoy Coding!
Check this Setup latest laravel on codeanywhere