RESTful API with Laravel: Build a real API with Laravel

14h 30m 19s
English
Paid

Course description

Build your RESTful API with Laravel, using a complete marketplace as the case of use. With Laravel, creating every component will be a breeze. You will have a project with users, sellers, buyers, transactions, products, and categories. Explore all types of relationships, one to many, many to many and much much more using Eloquent the Laravel ORM.

Read more about the course

So you need to build a RESTful API for a project, but you do not know even where to start? Do not worry I will guide you through the whole process to build a genuine RESTful API using Laravel.

Note: You can take, and in fact it is recommended, to follow the course using the most recent version of Laravel. Additionally, the course includes extensive sections about how to upgrade your project to different versions of Laravel, in case you decide to use any previous version.

The full guide for creating a real RESTful API with Laravel. You can follow the course using the latest Laravel version (it is recommended).

You will not find a Laravel course like this. This course explains everything you need to develop a RESTful API using the Laravel framework.

At the end of the course, you will have a RESTful API with Laravel, for a market system, where users can purchase and sell different products with different categories and transactions. Inclusive, the same user can be both a seller and a buyer (you will take advantage of inheritance for this).
¡Do Not wait anymore! Become a master in the development of genuinely RESTful APIs with Laravel. Join the course now and see you in class

Remember: The course has been constantly updated to use the latest versions of Laravel. So feel free to use the version you like (especially the latest version of Laravel).

In this course, you learn how to develop a realistic,  fully implemented, and professional RESTful API with Laravel.

Laravel is the most popular PHP framework, with more than 20 million downloads along with lots of enterprise and personal projects worldwide. Additionally, includes fantastic features to implement a RESTful API easily. Laravel is RESTful friendly.

What is a RESTful API?
A Web API is like a web service that works entirely with HTTP. A RESTful API must follow the REST (REpresentational State Transfer) practices, allowing to orientate the design to the resources, provide standard responses based on the different HTTP status codes, and the corresponding according to Hypermedia Links in responses (HATEOAS).

Why Laravel?
Because Laravel is a framework made by programmers for programmers, expressive, simple, intuitive and powerful. Laravel provides useful features for web projects including RESTful APIs.

Each new Laravel version includes many changes that make this framework even better, simple, programmer-friendly and at the same time much more powerful. In fact, the latest versions of Laravel included a lot of new features to help to develop RESTful APIs in the right way.

During this course, you will master the complete structure of Laravel, along with the new features included in the latest version of Laravel to develop an actual RESTful API.

You will learn this about the development of a RESTful API with Laravel:

  • Using the Laravel PHP artisan for code and components generation

  • Usage and creation of middleware on Laravel

  • The Laravel Resource routes and controllers (ideal for RESTful APIs)

  • Fully supported JSON format responses for a JSON RESTful API

  • Validation of requests directly from the Laravel Controllers

  • Handling all types of exceptions and errors from Laravel handler

  • Complex operations involving up to three resources/models for a specific operation

  • Usage of Laravel dependency injection and model binding

  • Generation of the database structure using Laravel migrations

  • Automatic insertion of fake data into the database through "faker," using Laravel factories, and seeders

  • Laravel Sessions and access_token authentication for the RESTful API. Yes, Both!

  • Using Laravel Passport to protect the RESTful API with OAuth2

  • Pagination of results using Laravel collections

  • Using URL parameters to execute actions (the RESTful approach)

  • Sorting results based on URL parameters with a RESTful approach

  • Filtering results using URL parameters

  • Caching responses using Laravel Cache System

  • Limitation of requests using the Laravel middleware

  • Implementing HATEOAS on Laravel (a pure RESTful API must use HATEOAS)

  • Using PHP Fractal for transforming responses

  • Usage of CORS on the API responses to allow JavaScript-based clients and web browsers.

  • Use the Laravel Policies and Gates to handle the user's authorization layer.

  • Much more!!

You can take a look at the full list of contents below. You will finish with a complete RESTful API and understanding a lot of Laravel skills.

You will create an actual RESTful API from scratch and step by step using Laravel. Follow the REST architecture and build appropriate URLs to identify actions and resources using the Laravel best features and learn Laravel in the way.

Take full advantage of tools like Sublime Text 3, Git, power shell, Laravel, Composer, PHP artisan, and be more productive for agile development.

Note: In few classes of the course I use Windows (only for the first classes), but I included specific directions in the case you use Linux or Mac and all the tools used are cross-platform, so you will no have any problem.

You will have lifetime access to the current classes and the classes that I will regularly add (take a look at the last section to see what is coming).

At the end of this course, you will be able to develop your pure RESTful API with Laravel in an efficient way with the best practices, taking advantage of the facilities provided by Laravel for the proper implementation of your projects and your RESTfulAPI.

Do not wait any longer. Join the course and see you in classes.

Requirements:
  • Very recommended a fundamental domain of Object Oriented Programming
  • Fundamental knowledge about PHP (classes, functions, methods, traits, inheritance)
Who this course is for:
  • This course is for all web development and PHP lovers
  • This course is for all those who need to develop their own API completely RESTful
  • If you want to build your own fully functional and step-by-step RESTful API
  • If you need to keep your skills up to date and be competitive
  • If you want to do a complete development of your projects and your RESTful API with Laravel

What you'll learn:

  • Create your own projects with Laravel (not only RESTful APIs)
  • Make the most of your work tools (Sublime Text 3, Git, Github, Composer, PHP artisan and Laravel)
  • Generate and maintain the structure of the database in an automated way with Laravel and the PHP Artisan console
  • Use PHP Artisan effectively and be much more efficient
  • Create and configure your own local development environment
  • Properly configure your development environment for all your projects
  • Hone the main HTTP methods/verbs for HTTP and RESTful APIs
  • Use free professional tools to improve your productivity

Watch Online

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 214 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing

Watch Online RESTful API with Laravel: Build a real API with Laravel

0:00
/
#1: About the Instructor and the Course

All Course Lessons (214)

#Lesson TitleDurationAccess
1
About the Instructor and the Course Demo
01:33
2
Taking Advantage of the Course and Contents
02:34
3
Downloading and Installing PHP with XAMPP
02:34
4
Downloading and Installing Composer
02:11
5
Downloading and Installing Virtual Box
01:49
6
Downloading and Installing Vagrant
02:02
7
Downloading and Installing Sublime Text 3
02:25
8
Downloading and Installing Github Shell
03:59
9
Downloading and Installing Node and NPM
03:28
10
Downloading and Installing Postman to Test the Laravel RESTful API
02:50
11
Obtaining Laravel Using Composer
01:58
12
Adding Laravel Homestead as a Dependency for The Laravel Project
01:27
13
Preparing and Configuring Laravel Homestead
04:21
14
Adding the Virtual Domain on The System
02:19
15
Using Vagrant to Manage the Laravel Homestead Virtual Machine
04:50
16
Keep The Laravel Project Updated
03:34
17
Installing the Package Control
01:36
18
Creating and Using Projects
02:19
19
Installing and Using SublimeCodeIntel to Resolve Laravel and RESTful API classes
03:01
20
Installing and Using SideBarEnhancement
02:09
21
Installing and Using SublimeLinter for PHP
02:16
22
Installing and Using PHPCompanion to Auto-import Laravel Definitions
04:01
23
Understanding the RESTful API Resources (Models) and its Relationships
04:16
24
Understanding the Main End-Points for the RESTful API
03:29
25
Discovering the Laravel Structure
07:30
26
Discovering the Laravel PHP Artisan Commands
04:54
27
Configuring the Laravel Environment Variables
04:03
28
Understanding the Laravel Routes System for RESTful APIs
03:02
29
Creating Initial Laravel Structures for The Models and Its Migrations
04:45
30
Creating an Initial Laravel Structure for The Controllers
03:35
31
Creating Some End-Point for the RESTful API Using Laravel Resource Routes
06:51
32
Implementing The Properties for Category
02:17
33
Implementing The Properties for Product
03:46
34
Implementing The Properties for Transaction
01:18
35
Implementing The Properties for User
05:43
36
Implementing The Relationships Between Models
05:30
37
Solving a Common Issue with the Laravel Migrations
02:43
38
Implementing The Migration for Users
02:28
39
Implementing The Migration for Categories
01:11
40
Implementing The Migration for Products
02:02
41
Implementing The Migration for Transactions
01:37
42
Creating the Migration for The Pivot Table
04:46
43
Creating The Laravel Factory for User
03:23
44
Creating The Factory for Category
01:27
45
Creating The Factory for Product
03:52
46
Creating The Factory for Transaction
04:54
47
Using The Factories from The DatabaseSeeder of Laravel
06:06
48
Executing The Migrations and Seeder using Artisan from Laravel
05:11
49
Implementing The Index Method for UserController
02:52
50
Implementing The Show Method for UserController
02:30
51
Implementing The Store Method for UserController
07:31
52
Implementing The Update Method for UserController
08:26
53
Implementing The Destroy Method for UserController
01:39
54
Implementing The Index Method for BuyerController
02:44
55
Implementing The Show Method for BuyerController
01:35
56
Implementing The Index Method for SellerController
02:16
57
Implementing The Show Method for SellerController
01:34
58
Defining Mutators and Accessor for Models
05:27
59
Generalizing The Response Methods
05:54
60
Using The Generalized Methods
03:10
61
Using The Generalized Methods for Error Responses
01:54
62
Returning Validation Errors as a JSON Response
04:37
63
Returning Model Not Found Errors as a JSON Response
03:00
64
Handling AuthenticationException
02:43
65
Handling AuthorizationException
02:09
66
Handling NotFoundHttpException
02:03
67
Handling MethodNotAllowedHttpException
02:16
68
Handling General HttpException
01:34
69
Catching Exceptions When Removing Related Resources
04:11
70
Handling Unexpected Exceptions
04:29
71
Using The Laravel Implicit Model Binding for Some Methods
02:51
72
Resolving Buyer Using Laravel Global Scopes
04:43
73
Resolving Seller Using Laravel Global Scopes
02:01
74
Modifying the Migrations for Soft Deleting
02:16
75
Using soft Deleting for All the Models
03:15
76
Implementing the Index Method for CategoryController
03:10
77
Implementing the Show Method for CategoryController
01:25
78
Implementing the Store Method for CategoryController
03:03
79
Implementing the Update Method for CategoryController
04:10
80
Implementing the Destroy Method for CategoryController
02:02
81
Implementing the Index Method for ProductController
02:27
82
Implementing the Show Method for ProductController
01:17
83
Implementing the Index Method for TransactionCategoryController
04:26
84
Implementing the Index Method for TransactionSellerController
04:25
85
Implementing the Index Method for BuyerTransactionController
02:55
86
Implementing the Index Method for BuyerProductController
06:40
87
Implementing the Index Method for BuyerSellerController
05:08
88
Implementing the Index Method for BuyerCategoryController
05:31
89
Implementing the Index Method for CategoryProductController
02:43
90
Implementing the Index Method for CategorySellerController
03:43
91
Implementing the Index Method for CategoryTransactionController
05:16
92
Implementing the Index Method for CategoryBuyerController
05:24
93
Removing the Pivot Table from the Results
01:48
94
Implementing the Index Method for SellerTransactionController
03:13
95
Implementing the Index Method for SellerCategoryController
02:22
96
Implementing the Index Method for SellerBuyerController
03:04
97
Implementing the Index Method for SellerProductController
02:51
98
Implementing the Store Method for SellerProductController
07:32
99
Implementing the Update Method for SellerProductController
07:19
100
Implementing the Destroy Method for SellerProductController
02:16
101
[Challenge] Implementing the Index Operation of ProductTransaction
04:24
102
[Challenge] Implementing the Index Operation of ProductBuyer
04:18
103
[Challenge] Implementing the Index Operation of ProductCategory
04:18
104
Implementing the Update Operation of ProductCategory
07:43
105
Implementing the Destroy Operation of ProductCategory
02:34
106
Implementing the Store Operation for ProductBuyerTransaction
11:54
107
Handling the Products Availability Using Events
03:14
108
Preparing the API for Images Uploading
03:31
109
Storing an Image When Creating a Product
04:11
110
Removing the Image When Deleting a Product
02:33
111
Updating the Image When Editing a product
04:26
112
Preparing the Laravel Project for Email Sending
06:16
113
Implementing the Verification System
05:38
114
Creating the Laravel Mailable for User Created
01:48
115
Implementing the UserCreated Mailable
04:27
116
Send Verification Email Using Events
03:32
117
Solving the Problem with Factories
02:51
118
Creating the Mailable for User Mail Changed
01:19
119
Implementing the UserMailChanged Mailable
02:04
120
Send Verification for Email Changed Using Events
03:25
121
Re-sending the Verification Email If Requested
03:23
122
Dealing with Failing-Prone Actions
03:25
123
Using Laravel Markdown Mailables
09:23
124
About the Middleware and How it Works in Laravel
05:35
125
Creating a Custom Middleware
09:03
126
About the Rate Limiting in Laravel and the Details
04:22
127
[Optional] Customizing the Response for “Too Many Attempts”
03:30
128
About Transformers and Why to Use It
05:36
129
Preparing the Laravel Project for Data Transforming
03:12
130
Creating the Transformer for User
07:36
131
Creating the Transformer for Seller and Buyer
02:25
132
Creating the Transformer for Category
01:20
133
Creating the Transformer for Transaction
02:02
134
Creating the Transformer for Product
02:46
135
Linking the Models with its Respective Transformer
03:10
136
Returning the New Transformed Responses
10:07
137
Sorting Results by Any Attribute
06:19
138
Understanding an Issue with Sorted Responses
03:09
139
Improving the Transformations to Solve the Problem
03:31
140
Implementing the Solution Using Transformers
02:45
141
Filtering Responses Based on Attributes
06:42
142
About Pagination
03:58
143
Paginating Already Built Collections
08:27
144
Allowing Custom Page Size
03:23
145
Implementing the Cache System
04:14
146
The Caching System and the Query Parameters
06:18
147
What is and Why to Use HATEOAS
03:39
148
Implementing HATEOAS Hypermedia Controls for Category Instances
06:43
149
Implementing HATEOAS Hypermedia Controls for Product Instances
03:11
150
Implementing HATEOAS for Transaction Instances
02:26
151
Implementing HATEOAS for User Instances
01:57
152
Understanding Two Problems with Transformations and Validations
02:39
153
Creating and Using a Middleware to Solve the Problem
05:53
154
Solving the First Problem Using the Middleware
04:04
155
Improving the Transformations to Solve the Second Problem
02:39
156
Improving the Middleware to Solve the Second Problem
07:54
157
Why is It Required for Our API
02:29
158
Creating the Additional Authentication Structure
03:06
159
Tuning Some Structures to Avoid Inconsistences
03:36
160
About CSRF and Handling CSRF Exceptions in Laravel
05:41
161
Returning HTML and Redirections When Required
08:01
162
About OAuth2 and Security on APIs
03:52
163
What is Laravel Passport
01:55
164
Preparing the Laravel Project to Use Laravel Passport
01:59
165
Using the Migrations of Laravel Passport
02:33
166
Installing Laravel Passport Definitively on the API
03:00
167
Making Users Authenticatable Through API Tokens
02:09
168
Registering the Required Routes
03:21
169
Configuring the Authentication System
01:38
170
Defining the Expiration Time for the Tokens
03:24
171
Using client_credentials Grant to Protect Some Routes
06:18
172
How to Obtain and Use Tokens Using Client Credentials
03:25
173
Protecting All the Routes
05:38
174
Using the Password Grant Type
04:48
175
Preparing the API to Use the Passport Components
08:11
176
Creating the Views to Manage the Personal Tokens
05:05
177
About the Personal Tokens and How to Use It
02:41
178
Allowing the Management of API Clients
07:57
179
About the Authorization Code Grant Type
09:38
180
Using the Implicit Grant Type
05:56
181
Refreshing Tokens
05:20
182
What are Scopes on OAuth2?
03:09
183
Registering Some Required Scopes for the API
05:51
184
Registering the Laravel Passport Middleware to Check Scopes
03:55
185
Restricting the Action that Needs the “purchase-product” Scope
04:43
186
Restricting the Actions that Need the “manage-products” Scope
05:28
187
Restricting the Actions that Need the “manage-account” Scope
03:52
188
Restricting the Actions that Need the “read-general” Scope
08:34
189
About the Final Security Layer
03:42
190
What are Policies and Gates on Laravel?
04:05
191
Implementing the Restrictions Over Buyer
07:43
192
Implementing the Restrictions Over Seller
07:16
193
The Restrictions over User
07:33
194
Implementing the Restrictions Over Transaction
05:01
195
Implementing the Restrictions Over Product
05:05
196
Allowing All Actions for Admin Users
06:15
197
Allowing Remaining Actions ONLY Admin Users Can Do
08:43
198
About CORS
04:11
199
Installing the CORS Package for Laravel
01:35
200
Configuring the CORS Package
03:35
201
Allowing CORS Only for the API
04:19
202
Allowing CORS on Error Responses Too
05:27
203
Identifying an Authenticated User in the RESTful API
06:05
204
About the Upgrading Process to Laravel 5.5
03:31
205
Upgrading to Laravel 5.5 Along With Dependencies
04:24
206
Upgrading the Source Code According to Laravel 5.5
06:30
207
Preparing the Environment to Upgrade
05:20
208
Obtaining Laravel 5.6
03:37
209
Installing Updated Dependencies
02:40
210
Solving Issues and Updating the Project Structure
05:42
211
Preparing the development environment to upgrade
03:51
212
Installing Laravel 5.7 an upgrading dependencies for the RESTful API
04:52
213
Upgrading the components and structures
05:25
214
Thanks for Be Here!
01:42

Unlock unlimited learning

Get instant access to all 213 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

SAAS Adventure - Learn to Create your own SAAS

SAAS Adventure - Learn to Create your own SAAS

Sources: saasadventure.io
In this 21-day program you will learn you how to create your very own SAAS application!
8 hours 37 minutes 3 seconds
Roles and permissions in Laravel

Roles and permissions in Laravel

Sources: Codecourse
Powerful role and permission checking doesn't need to be complicated. Let's build our own solution, including custom blade directives and middleware.
1 hour 7 minutes 43 seconds
How to Structure Laravel Project

How to Structure Laravel Project

Sources: laraveldaily.com
Basic Laravel is an MVC framework, it’s clear what should be in Model, View and Controller. But what if you have custom logic for processing data before passing it to the view? ...
4 hours 51 minutes 17 seconds
Mastering Laravel 10 Query Builder, Eloquent & Relationships

Mastering Laravel 10 Query Builder, Eloquent & Relationships

Sources: udemy
Are you struggling with Laravel databases and Eloquent? Do you want to learn how to easily manage your database with migrations and seeders? Look no further than Code With Dary'...
7 hours 27 minutes 32 seconds
Build an e-commerce platform

Build an e-commerce platform

Sources: Codecourse
Build a robust e-commerce platform with a Laravel API and Nuxt frontend. Products with flexible variations, proper price implementation, a full checkout experience with dynamic ...
14 hours 19 minutes 18 seconds