RESTful API with Laravel (5.0 to 5.2)
3.2 (235 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,915 students enrolled
Wishlisted Wishlist

Please confirm that you want to add RESTful API with Laravel (5.0 to 5.2) to your Wishlist.

Add to Wishlist

RESTful API with Laravel (5.0 to 5.2)

Create a RESTful API with Laravel and PHP. Dominates RESTful using Laravel and PHP
3.2 (235 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,915 students enrolled
Created by JuanD MeGon
Last updated 3/2016
Current price: $10 Original price: $25 Discount: 60% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 6 hours on-demand video
  • 7 Articles
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Create your own projects with Laravel 5.
  • Hone your work tools (Sublime Text 3, Git, Github, Composer and PHP artisan)
  • Create and maintain automatically your database structure with Laravel and the PHP artisan command prompt.
  • Use effectively PHP artisan and be more efficient.
  • Create your own public repositories for your projects.
  • Create and configure your own local environment to develop your projects.
  • Choose the bests practices to carry out your projects to a production environment.
  • Configure correctly all your environments for your projects.
  • Use and learn the main HTTP methods for a RESTful API.
  • Make an agile projects development, honing your tools and practices.
  • Create an maintain your own production server in Linux.
  • Use free and professional tools to improve your productivity.
  • Interact with Windows and Linux systems simultaneously.
  • Obtain a preview of the course results in:
View Curriculum
  • Programming PHP
  • Basic knowledge about object oriented programming (classes, methods, attributes, inheritance)
  • Download Sublime Text 3 for Windows (Don't install )
  • Download Composer for Windows (We'll install during the course)
  • Download XAMPP for Windows (Don't install)

The complete Laravel course for RESTful APIs.

This course include classes for the recent Laravel versions: All the Laravel 5.0, 5.1 and 5.2 versions.

Create your own RESTful API with Laravel, step by step, from development to production. Publish your Laravel project in your server at the end of the course.

Laravel has more than 30,000 public projects. Definitely, Laravel is the most popular framework for PHP.

Laravel is very expresive, simple AND powerful, develop complex platforms and projects with few lines of code using Laravel powers. Avoid the boilerplate code and focus in the functionality, not in the code.

During this course you are going to learn, about Laravel and RESTful: Create class-by-class your own RESTful API using Laravel.

Learn about this on Laravel for RESTful APIs:

  • Middlewares with Laravel
  • Laravel requests: Requests validation and authorization
  • REST controllers in Laravel
  • Exceptions/Errors handling with Laravel
  • Database Migrations
  • Database Seeds
  • Authentication in Laravel
  • Stateless authentication for RESTful API
  • CSRF in Laravel and the RESTful APIs
  • OAuth2 access and validations on Laravel
  • File uploading through the API with Laravel
  • Much more! Check the course contents

You are going to use Laravel to create a completely functional RESTful API from scratch using the Laravel powers.

¡Much more! You will have access to all the classes for ever and access for periodical bonus classes all about PHP, Laravel and RESTful APIs.

Follow the REST architecture and the best practices to build URIs, identify resources and actions using the Laravel resources controllers.

Hone all the features of your development tools (Sublime Text 3, Git, Github, Laravel, Composer, PHP artisan) be more productive and efficient in your developments, specially for your Laravel projects.

Learn to develop projects in a local environment within XAMPP (Apache and MySQL) and the appropriate configuration of your tools; create projects in local and carry them to a production environment in Linux, runing Nginx, PHP and MySQL and using Laravel in both environments.

Learn how to use Laravel through the command line within PHP artisan to build all the components for your RESTful API using all the HTTP methods(GET, POST, PUT, PATCH y DELETE).

At the end of this course you are going to have the capacity to develop your own RESTful API with Laravel and PHP easily and faster, domain the new features, concepts and structure to create a functional RESTful API with the Laravel powers.

See you in classes.

Who is the target audience?
  • If you want to upgrade from Laravel 4 to Laravel 5.
  • If want to hone all the, features and advantajes of Laravel 5.
  • If want to learn to do agile development of your projects.
  • If you wish to implement your own API, completely functional and easily.
  • If you want to develop your projects in multiple environments simultaneously and put it on production.
  • If wish to implement a featured API following the REST architecture.
  • If you need to maintain you skills up to date and be competitive.
  • If you wish to share your projects and skills with the world.
Compare to Other RESTful API Courses
Curriculum For This Course
57 Lectures
Preparing the local tools
8 Lectures 36:52

What we going to do during this course and how.

Preview 01:08

How to install XAMPP in our Windows local environment, and run Apache and MySQL.

Installing Apache and MySQL with XAMPP

We'll learn a virtual host in Apache to emulate real conditions in our local environment.

Preview 05:31

How to install and use Composer in our Windows local environment.

Installing composer in local environment

How to install and configure Sublime Text 3, install very useful plugins which allow us to develop easy and faster our projects.

Installing and configuring Sublime Text 3 to develop

How to download, install and use Git and Github to create our local repositories and mainstain a version control for the project.

Installing and using Git and Github in local

We going to obtain a copy of the new structure for Laravel 5 using composer and check it out.

Obtaining and configuring Laravel 5 in local

If you want to use Laravel with a local environment in another operating system like Linux you need to do some changes.

Installing Laravel 5 in Linux or OSx
Creating the structure and components for our API
8 Lectures 01:08:18

How to follow the source code of the project easily class by class and easily copy/paste.

The Source Code of The Project

We going to see the new folder structure of laravel and a functional example.

The new Laravel 5 structure and How to use it

During this class we going to create our models for the API and define the relations between them

Creating our models

We going to define the structure of our tables inside the database using PHP artisan.

Creating our database structure using Laravel and PHP artisan only

During this class we going to insert data automatically into our database using Laravel seeders.

Inserting data using seeders and Faker data

For the latest changes in Laravel 5, some things changed for the routes:list command. Lets see about it and how to solve.

Some changes about the routes

How to create easily our REST routes with PHP artisan

Creating the REST routes for our API

In this class we going to create our controllers structure using php artisan and keeping only the neccessary methods.

Creating our API controllers
Implementing our API operations (methods - CRUD)
7 Lectures 56:58

Implementing our index and show methods for our only Vehicle and Maker controllers.

Showing values for an only resource

During this class we going to implement the index and show methods for our nested resource controller

Showing values for nested resources

We going to see the problem with the CSRF middleware for our API, and how to disable it, temporarily.

The problem with our API and the CSRF middleware

We going to add makers to the database implementing the stroe method and using a Request controller to validate our data.

Storing makers in our API, using Request controllers

Storing vehicles associated with and specific maker, using our nested resources controller and a Request controller to validate data.

Storing nested resources, using Request controllers

Implementing the update method to receive requests on the PUT and PATCH methods.

Updating data for our resources

Implementing the destroy method to remove data in our database.

Deleting resources
Improving the security and features of our API
4 Lectures 39:32

Implementing basic auth to our sensible operations like, store, update and destroy.

Basic Auth and middleware

We going to see what is CSRF and how this could be used in our API

Hacking our API using CSRF

We going to implement our own middleware to use stateless basic auth and avoid the CSRF vulnerability.

Avoiding CSRF vulneraibility creating our own Middleware

Implementing handlers to bad requests and for unexpected errors.

Improving and fixing our API features
Preparing our production environment
5 Lectures 37:37

We going to create our own free VPS trial, and configure then to be functional and secure.

Creating our production environment on Linux

In this class we going to create our free domain to use for out API and make some tests.

Creating our own free domain for testing

We going to install an Nginx server to obtain a more productive server, and configure it for our domain.

Installing and configuring Nginx in our production environment

Installing PHP and MySQL and linking all this with Nginx server in our VPS.

Installing PHP and MySQL in production environment

We going to install our Composer and Git packages to install then our dependencies and the project structure.

Installing Composer and Git
Synchronizing and configuring our production environment
5 Lectures 22:45

We going to create our account on GitHub (fi no have any yet) and then we going to create our first public repository for the API project.

Preview 03:01

We going tu push all oor local project files, into a remote repository using Github.

Synchronizing our local repository with the remote on Github

Putting our API code from the remote repository into our production environment.

Putting our Laravel5 project structure on production

Is possible that after do all the neccessary to deploe Laravel 5 in you VPS it still not working showing a "White page" and returning a 500 Internal Server error.

Solving the "White page" issue (500 Internal server error)

We are going to finish with all the required configurations to make work our API.

Finishing Our Laravel5 and Environment Configuration
Useful Features
3 Lectures 15:10

Learn how to easily add the version to the URIs of the API.

Adding the version to our API path

Adding a cache system to reduce the database overload for some specific requests.

Caching responses to reduce the burden of the database

Paginating the result by small sets of data to reduce the overload. Take into account that it could be inconsistent with the cache system.

Pagination of Results
Bug Fixing and Upgrading to Laravel 5.1
2 Lectures 11:18

During this class you are going to learn how to upgrade your Laravel 5 project to the 5.1 version, keeping all the features of the project.

Upgrading to Laravel 5.1

During this new class, you are going to fix some details which are going to improve the user experience in the API.

  1. Adding the id in the index and show methods.
  2. Adding the id as a result of the store methods.
Fixing Some Details
OAuth2 Security: Controlling Access and Validation of Requests
5 Lectures 28:01

During this lecture you are going to learn what OAuth2 is, the different grant functions and which is suitable during the course.

Introduction to OAuth2

If you taked the course before at 02/11/2015 you may want to remove the old version to proceed with the next classes.

Note: If you do not have installed a old version of OAuth server, you don't need to follow this class

[Optional] Removing the Old Version of OAuth2

During this section you are going to add the OAuth2 Server as a dependency of your Laravel project and then install all the required database tables, values and files for the configuration.

Obtaining and Installing the OAuth2 Server on Laravel

The OAuth2 server is almost done, you need to add a grant_type to obtain the access tokens, run the migrations and create clients to test how it is working.

Configuring and Testing The OAuth2 Server

During this class you are going to finally specify which routes and operations you want to protect through the OAuth2 middleware.

Def: A middleware is a mechanisms that is executed before to attend a requests, if the middleware "decide" to pass the requests all works, but if not the requests is rejected. In Lumen you can execute a middleware for every request or for a specific requests.

Protecting the Resources and Operations Using OAuth2 access_token
Uploading Files to Our RESTful API
5 Lectures 22:22

During this class you are going to create the model (called File), the migration, the controller and the route that are going to allow to a user to upload files.

Creating the Structure to Upload Files

During this section you are going to implement the method to upload and store the files, both in database and in the system.

Implementing the Store Method

During this class you are going to implement the update method, to edit an existing file.

Take into account that the PU/PATH methods does nos accespt files directly, so we need to use the POST method, but sending the "_method" parameter equals to PUT, to emulate a request using this methods.

Implementing the Update Method

During this class you are going to implement the index, show and destroy method to finally have a completely functional manager for files.

Implementing the Other Methods

At this point any client or user can create, update and delete files, but these operations must be protected. Use the OAuth middleware to protect these operations.

[Exercise] Protecting the Store, Update and Destroy Methods
2 More Sections
About the Instructor
JuanD MeGon
4.4 Average rating
1,525 Reviews
6,829 Students
12 Courses
Master, Engineer, Web Developer, Programmer & Instructor

I enjoy transmitting knowledge and skills to people through classes and contents, in fact, I am the owner and creator of programarya, an Spanish web site to teach programming fundamentals, and of course, I have several premium contents about programming and web development in general, as well.

I continually work on improving my speech, looking for the best way to reach out the students with the central concepts and skills, I love easy but effective ways to transmit every single idea.

I appreciate every minute developing, especially when I can use my skills to implement projects that can help other developers to learn and to make their job and lives easier.

I am constantly looking to work in new projects to leverage my skills and improving the lives of people with more facilities to share the experiences and findings with my students then.

I am excited to contribute to a better world teaching people new skills and, in the way, learn through the experiences and issues of them to improve our skills together.