Creating a Polling Application Using AngularJS and Laravel Part 1

AngularJS and Laravel Tutorial Part 1

Polling Application Screenshots

In this tutorial, we will build a single page polling web application using AngularJS and Laravel. Our application will allow the users to select one of the listed polls and submit their choice. The users will also be able to view the stats of the polls in a graphical form.

We will build the application’s front end using AngularJS, and for the data persistence, we will utilize a RESTful API which we will create using Laravel. The tutorial assumes that you have a basic understanding of AngularJS workings and familiar with concepts like: two-way data binding, scopes, directives etc. Read more…


Web Development Environments Using Vagrant on Ubuntu Linux

Setting up Web Development Environments can be an exasperating task. Especially, when you need to work on multiple projects with different dependencies, configurations, library requirements, programming language versions and operating systems. If you have been developing web applications for sometime, then you definitely know the drill.

Vagrant is a tool that helps you in creating and setting up Development Environments quickly in an automated fashion by using virtualization softwares such as VirtualBox and VMware. These environments are then, can be reproduced and redistributed using a single configuration file. To automate the process, Vagrant uses certain provisioning tools like: shell scripts, Chef and Puppet. Read more…


Creating a Blog Using Laravel 4 Part 4: Layout and Views

Previous parts of this tutorial:

This will be the last part of the Creating a Blog using Laravel series, In this part, we will cover the layout and views for the Blog Application we are creating. Let’s see what we have already covered:

  • Laravel Setup
  • Laravel Migrations
  • Model creation using Eloquent ORM
  • Database Seeding
  • Controllers
  • Routing

View: The V in MVC

Views in a MVC web framework are used to isolate the presentation logic from the business, and the application logic. In a typical MVC web framework, whenever a request is received, the routing component parses the request and figures out the right controller action to handle the request. The controller action, then fetches the requested data from the model and passes it to the view. And finally, a response is returned containing the HTML markup generated by the view to present the data. Read more…


Creating a Blog Using Laravel 4 Part 3: Routing

Creating a Blog Using Laravel 4 Part 3 Routing

Laravel 4 Blog Tutorial – Routing Screenshot

Previous parts of this tutorial:

Topics we have covered so far:

  • Laravel Setup
  • Laravel Migrations
  • Model creation using Eloquent ORM
  • Database Seeding
  • Controllers

Today we will cover the routing for our blog application. So, let’s get started.

Routing in Laravel

Routing plays an essential role in the core workings of any MVC framework. It specifies a mapping between requests and response generators i.e, controller actions. In other words, routing defines the entry points of a web application. A flexible routing provides a greater control over the flow of a web application.
Laravel has a very powerful routing component built right on the top of Symfony’s routing component, and provides you with a very easy to use interface and a rich set of functionalities. Read more…


Creating a Blog Using Laravel 4 Part 2: Controllers

Creating a Blog Using Laravel 4 Part 2

Laravel 4 Blog Tutorial – dashboard Screenshot

In the first part of Creating Blog Using Laravel 4 we had covered: Laravel setup, Laravel Migrations, model creation using Eloquent ORM and Database Seeding. In this part of the tutorial we will cover the controllers for our blog application.

Creating Controllers

In Laravel we create controllers by extending BaseController class present inside app/controllers directory. All of our controller classes reside inside app/controllers directory.

Note:
Laravel does not have any restrictions on the directory structure of the application, we can rearrange the application’s directory structure according to our needs and adjust the composer settings accordingly.

Read more…