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

What's hot (20)

PDF
Ember.js for Big Profit
CodeCore
 
PPTX
No SQL with Kendo UI
Dhananjay Kumar
 
KEY
Architecting single-page front-end apps
Zohar Arad
 
PPTX
REST Easy with AngularJS - ng-grid CRUD EXAMPLE
reneechemel
 
PPTX
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
Charlie Key
 
DOCX
Understanding angular js $rootscope and $scope
Brajesh Yadav
 
PDF
ESNext, service workers, and the future of the web
Jemuel Young
 
PDF
Embracing the Future
Jemuel Young
 
PDF
Python for AngularJS
Jeff Schenck
 
PPTX
Jsp session 4
Anuj Singh Rajput
 
DOCX
Controller in AngularJS
Brajesh Yadav
 
PPTX
React basic by Yoav Amit, Wix
Chen Lerner
 
PPTX
A Minimalist’s Attempt at Building a Distributed Application
David Hoerster
 
PDF
Introduction to AJAX In WordPress
Caldera Labs
 
DOCX
Directives
Brajesh Yadav
 
PDF
AppBuilder Tour
knightfour
 
PPTX
Angularjs Anti-patterns
Steven Lambert
 
PPTX
Alfresco Mvc - a seamless integration with Spring Mvc
Daniel Gradecak
 
PDF
Rspec API Documentation
SmartLogic
 
PDF
Make <input> more accessible with metadata
Intopia
 
Ember.js for Big Profit
CodeCore
 
No SQL with Kendo UI
Dhananjay Kumar
 
Architecting single-page front-end apps
Zohar Arad
 
REST Easy with AngularJS - ng-grid CRUD EXAMPLE
reneechemel
 
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
Charlie Key
 
Understanding angular js $rootscope and $scope
Brajesh Yadav
 
ESNext, service workers, and the future of the web
Jemuel Young
 
Embracing the Future
Jemuel Young
 
Python for AngularJS
Jeff Schenck
 
Jsp session 4
Anuj Singh Rajput
 
Controller in AngularJS
Brajesh Yadav
 
React basic by Yoav Amit, Wix
Chen Lerner
 
A Minimalist’s Attempt at Building a Distributed Application
David Hoerster
 
Introduction to AJAX In WordPress
Caldera Labs
 
Directives
Brajesh Yadav
 
AppBuilder Tour
knightfour
 
Angularjs Anti-patterns
Steven Lambert
 
Alfresco Mvc - a seamless integration with Spring Mvc
Daniel Gradecak
 
Rspec API Documentation
SmartLogic
 
Make <input> more accessible with metadata
Intopia
 

Similar to Laravel + Restangular Introduction (20)

PDF
Angularjs & REST
Corley S.r.l.
 
PPTX
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
Perfomatix Solutions
 
PPTX
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
aravym456
 
PPTX
Vancouver AngularJS using $resource in your application
Sachin Agrawal
 
PDF
Things you must know on ruby on rails single page application
Andolasoft Inc
 
PDF
Intro to BackboneJS + Intermediate Javascript
Andrew Lovett-Barron
 
PPT
Using RESTFUL APIs in ANGULARJS
Mindfire Solutions
 
PPT
Rails Vs CakePHP
Gautam Rege
 
PPT
Angular js How, What & Why - MetaRefresh 2014
shyamsesh
 
DOCX
Online grocery store
Kavita Sharma
 
PPTX
The future of web development write once, run everywhere with angular.js and ...
Mark Roden
 
PDF
The future of web development write once, run everywhere with angular js an...
Mark Leusink
 
PPTX
Exploring AngularJS - Liju Pillai
Liju Pillai
 
PPTX
GraphQL Introduction with Spring Boot
vipin kumar
 
PPTX
AngularJS One Day Workshop
Shyam Seshadri
 
PPTX
Angular js 1.3 basic tutorial
Al-Mutaz Bellah Salahat
 
PPTX
React.js at Cortex
Geoff Harcourt
 
PPT
Getting started with angular js
Maurice De Beijer [MVP]
 
PPTX
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Deepu S Nath
 
PPTX
Node.js and MongoDB from scratch, fully explained and tested
John Culviner
 
Angularjs & REST
Corley S.r.l.
 
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
Perfomatix Solutions
 
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
aravym456
 
Vancouver AngularJS using $resource in your application
Sachin Agrawal
 
Things you must know on ruby on rails single page application
Andolasoft Inc
 
Intro to BackboneJS + Intermediate Javascript
Andrew Lovett-Barron
 
Using RESTFUL APIs in ANGULARJS
Mindfire Solutions
 
Rails Vs CakePHP
Gautam Rege
 
Angular js How, What & Why - MetaRefresh 2014
shyamsesh
 
Online grocery store
Kavita Sharma
 
The future of web development write once, run everywhere with angular.js and ...
Mark Roden
 
The future of web development write once, run everywhere with angular js an...
Mark Leusink
 
Exploring AngularJS - Liju Pillai
Liju Pillai
 
GraphQL Introduction with Spring Boot
vipin kumar
 
AngularJS One Day Workshop
Shyam Seshadri
 
Angular js 1.3 basic tutorial
Al-Mutaz Bellah Salahat
 
React.js at Cortex
Geoff Harcourt
 
Getting started with angular js
Maurice De Beijer [MVP]
 
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Deepu S Nath
 
Node.js and MongoDB from scratch, fully explained and tested
John Culviner
 
Ad

Recently uploaded (20)

PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PPTX
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
PDF
Open Source Milvus Vector Database v 2.6
Zilliz
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PDF
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PDF
The Growing Value and Application of FME & GenAI
Safe Software
 
PDF
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PDF
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Priyanka Aash
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
Open Source Milvus Vector Database v 2.6
Zilliz
 
Practical Applications of AI in Local Government
OnBoard
 
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
The Growing Value and Application of FME & GenAI
Safe Software
 
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
Kubernetes - Architecture & Components.pdf
geethak285
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Priyanka Aash
 
Ad

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.