SlideShare a Scribd company logo
Laravel + Restangular 
Let’s do this.
But first 
Who am I? 
Andrew Del Prete 
@pathsofdesign 
www.pathsofdesign.com
What we’re covering 
• Some of the benefits of Restangular over alternatives 
• An intro on how to do basic HTTP requests with Restangular 
• A quick review of Laravel Resource Routes 
• Build a small SPA (Korra) to demonstrate how it works 
• Online resources 
• That’s all folks 
• Questions
So what is Restangular? 
“Restangular is an AngularJS service that simplifies common GET, POST, 
DELETE, and UPDATE requests with a minimum of client code. It's a 
perfect fit for any WebApp that consumes data from a RESTful API.” 
https://github.com/mgonto/restangular
Benefits Much? 
• Creating a Single Page Application (SPA) is easier than ever. 
• Promises Promises. 
• A great way to simplify JSON CRUD. 
• Utilizes explicit Syntax that is easy to remember. 
• Allows you to forget full URLs. 
• Supports all HTTP methods. 
• Helps the developer throw away the jQuery “Crutch” 
• Allows you to chain methods together for complex requests. 
• Very configurable / customizable. 
And more!
Can’t I already AJAX? 
The alternatives 
jQuery offers a great line of AJAXY methods. $.ajax, $.get, $.json, etc… The problem is 
these methods are low level and are not abstracted into a reusable service. 
$http is the low level AJAX service that’s native to AngularJS. It’s a lot like jQuery’s 
AJAX methods but can be injected into Angular and is what Restangular builds upon 
internally. 
$resource is the native REST Module in AngularJS. It’s difficult to use and buggy. 
Restangular aims to solve the flaws of $resource and provide a better service for REST.
Restangular Requirements 
AngularJS 
Lodash or Underscore
Setting up Restangular
Creating Main Restangular Object 
There are 3 ways of creating a main Restangular object. The first one and most 
common is by stating the main route of all requests. The second one is by stating the 
main route and object of all requests. Each object can be built upon and utilized later 
in our code to do various requests.
Get, Post, Put, and Delete
Chaining Requests
Let’s Build Something!
Resources 
Korra - https://github.com/Pathsofdesign/korra 
The blog experiment I demonstrated. I hope to add features and refine. 
Restangular Docs - https://github.com/mgonto/restangular 
Surprisingly good Documentation! 
ng-newsletter - http://www.ng-newsletter.com/posts/restangular.html 
Great resource for AngularJS all around.
That’s all Folks!

More Related Content

PDF
REST in AngularJS
PDF
Build REST API clients for AngularJS
PDF
How to connect AngularJS to servers
PDF
Ch. 11 deploying
PPTX
Introduce cucumber
PDF
Performance
PDF
Consuming REST services with ActiveResource
DOCX
Shaping up with angular JS
REST in AngularJS
Build REST API clients for AngularJS
How to connect AngularJS to servers
Ch. 11 deploying
Introduce cucumber
Performance
Consuming REST services with ActiveResource
Shaping up with angular JS

What's hot (20)

PDF
Ember.js for Big Profit
PPTX
No SQL with Kendo UI
KEY
Architecting single-page front-end apps
PPTX
REST Easy with AngularJS - ng-grid CRUD EXAMPLE
PPTX
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
DOCX
Understanding angular js $rootscope and $scope
PDF
ESNext, service workers, and the future of the web
PDF
Embracing the Future
PDF
Python for AngularJS
PPTX
Jsp session 4
DOCX
Controller in AngularJS
PPTX
React basic by Yoav Amit, Wix
PPTX
A Minimalist’s Attempt at Building a Distributed Application
PDF
Introduction to AJAX In WordPress
DOCX
Directives
PDF
AppBuilder Tour
PPTX
Angularjs Anti-patterns
PPTX
Alfresco Mvc - a seamless integration with Spring Mvc
PDF
Rspec API Documentation
PDF
Make <input> more accessible with metadata
Ember.js for Big Profit
No SQL with Kendo UI
Architecting single-page front-end apps
REST Easy with AngularJS - ng-grid CRUD EXAMPLE
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
Understanding angular js $rootscope and $scope
ESNext, service workers, and the future of the web
Embracing the Future
Python for AngularJS
Jsp session 4
Controller in AngularJS
React basic by Yoav Amit, Wix
A Minimalist’s Attempt at Building a Distributed Application
Introduction to AJAX In WordPress
Directives
AppBuilder Tour
Angularjs Anti-patterns
Alfresco Mvc - a seamless integration with Spring Mvc
Rspec API Documentation
Make <input> more accessible with metadata
Ad

Similar to Laravel + Restangular Introduction (20)

PDF
Angularjs & REST
PPTX
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
PPTX
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
PPTX
Vancouver AngularJS using $resource in your application
PDF
Things you must know on ruby on rails single page application
PDF
Intro to BackboneJS + Intermediate Javascript
PPT
Using RESTFUL APIs in ANGULARJS
PPT
Rails Vs CakePHP
PPT
Angular js How, What & Why - MetaRefresh 2014
DOCX
Online grocery store
PDF
The future of web development write once, run everywhere with angular js an...
PPTX
The future of web development write once, run everywhere with angular.js and ...
PPTX
Exploring AngularJS - Liju Pillai
PPTX
GraphQL Introduction with Spring Boot
PPTX
AngularJS One Day Workshop
PPTX
Angular js 1.3 basic tutorial
PPTX
React.js at Cortex
PPT
Getting started with angular js
PPTX
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
PPTX
Node.js and MongoDB from scratch, fully explained and tested
Angularjs & REST
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
Vancouver AngularJS using $resource in your application
Things you must know on ruby on rails single page application
Intro to BackboneJS + Intermediate Javascript
Using RESTFUL APIs in ANGULARJS
Rails Vs CakePHP
Angular js How, What & Why - MetaRefresh 2014
Online grocery store
The future of web development write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular.js and ...
Exploring AngularJS - Liju Pillai
GraphQL Introduction with Spring Boot
AngularJS One Day Workshop
Angular js 1.3 basic tutorial
React.js at Cortex
Getting started with angular js
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Node.js and MongoDB from scratch, fully explained and tested
Ad

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Spectroscopy.pptx food analysis technology
PDF
cuic standard and advanced reporting.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Machine Learning_overview_presentation.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Big Data Technologies - Introduction.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Empathic Computing: Creating Shared Understanding
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
Teaching material agriculture food technology
Assigned Numbers - 2025 - Bluetooth® Document
Spectroscopy.pptx food analysis technology
cuic standard and advanced reporting.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Machine Learning_overview_presentation.pptx
MIND Revenue Release Quarter 2 2025 Press Release
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
MYSQL Presentation for SQL database connectivity
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Big Data Technologies - Introduction.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Machine learning based COVID-19 study performance prediction
sap open course for s4hana steps from ECC to s4
Advanced methodologies resolving dimensionality complications for autism neur...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Empathic Computing: Creating Shared Understanding
The AUB Centre for AI in Media Proposal.docx
Teaching material agriculture food technology

Laravel + Restangular Introduction

  • 1. Laravel + Restangular Let’s do this.
  • 2. But first Who am I? Andrew Del Prete @pathsofdesign www.pathsofdesign.com
  • 3. What we’re covering • Some of the benefits of Restangular over alternatives • An intro on how to do basic HTTP requests with Restangular • A quick review of Laravel Resource Routes • Build a small SPA (Korra) to demonstrate how it works • Online resources • That’s all folks • Questions
  • 4. So what is Restangular? “Restangular is an AngularJS service that simplifies common GET, POST, DELETE, and UPDATE requests with a minimum of client code. It's a perfect fit for any WebApp that consumes data from a RESTful API.” https://github.com/mgonto/restangular
  • 5. Benefits Much? • Creating a Single Page Application (SPA) is easier than ever. • Promises Promises. • A great way to simplify JSON CRUD. • Utilizes explicit Syntax that is easy to remember. • Allows you to forget full URLs. • Supports all HTTP methods. • Helps the developer throw away the jQuery “Crutch” • Allows you to chain methods together for complex requests. • Very configurable / customizable. And more!
  • 6. Can’t I already AJAX? The alternatives jQuery offers a great line of AJAXY methods. $.ajax, $.get, $.json, etc… The problem is these methods are low level and are not abstracted into a reusable service. $http is the low level AJAX service that’s native to AngularJS. It’s a lot like jQuery’s AJAX methods but can be injected into Angular and is what Restangular builds upon internally. $resource is the native REST Module in AngularJS. It’s difficult to use and buggy. Restangular aims to solve the flaws of $resource and provide a better service for REST.
  • 7. Restangular Requirements AngularJS Lodash or Underscore
  • 9. Creating Main Restangular Object There are 3 ways of creating a main Restangular object. The first one and most common is by stating the main route of all requests. The second one is by stating the main route and object of all requests. Each object can be built upon and utilized later in our code to do various requests.
  • 10. Get, Post, Put, and Delete
  • 13. Resources Korra - https://github.com/Pathsofdesign/korra The blog experiment I demonstrated. I hope to add features and refine. Restangular Docs - https://github.com/mgonto/restangular Surprisingly good Documentation! ng-newsletter - http://www.ng-newsletter.com/posts/restangular.html Great resource for AngularJS all around.