You are here

Developing web applications with Laravel and BackboneJs - Prerequisites

To start building applications with Laravel framework and BackboneJs you would need to perform some set up work - get the system ready to meet the requirements, So;
If you are working with Vagrant and managing your local development environment with Virtual box, then you would only need git as a requirement. Laravel offers a prebuilt Vagrant box with all the tools needed and ready on system - Homestead. Please refer to url for installation instructions.
Once you have pulled Homestead on your computer, before running vagrant up you would need to make some adjustments;

  • Open up the Homestead.yaml file and change "to" directive in sites setting so it looks like /home/vagrant/Code/frontend,
  • Make sure you have Code folder on the same folder where you get Vagrantfile,
  • On your computer edit hosts file and add this entry 192.168.10.10  homestead.app, as we won't be using forwarded localhost's port. If you've changed ip address in yam file make sure that it matches the one you've chosen,
  • Once all this is done navigate to Code folder and and clone this github repository Laravel BackboneJs projects. Do not put it in a subdirectory, but directly on Code folder!

If you prefer working directly on your personal computer, below are system requirements.
System requirements
As official documentation states larevel-server-requirements should be as following.

  • PHP >= 5.4. Make sure that you meet this version.
  • MCrypt PHP Extension
  • As of PHP 5.5, some OS distributions may require you to manually install the PHP JSON extension. When using Ubuntu, this can be done via apt-get install php5-json.
  • DataBase engine, can be MySQL,MariaDB, PostgressSQL or even MSSQL server(Mysql is recommended),
  • GIT, we will need it for collaborative work,
  • Github account, takes couples of minutes to register,
  • Composer - PHP package management tool . On more information on how to get this on your system read here,
  • NodeJs and npm. We would use these to compile sass style sheets,
  • Bower, for frontend dependency management.

Next you will need to set up web server. I do suggest not using localhost directly. Lets use homestead.app instead. To get this working you would need to configure Apache or Nginx virtual hosts. Please refer to their relevant documentation. Once you've setup virtual host clone the following github repository Laravel BackboneJs projects in your project's root folder. When done make sure that Virtual hosts document root points to the "frontend" folder in the repository you've cloned in previous step. To test if everything is working correctly, in your browser navigate to http://homestead.app/info and you should get "phpinfo page ".
Once you have all this set up and ready, your system is configured to start building applications with Laravel and BackboneJs.