Laravel API Server

Modern web apps rely heavily on API endpoints. In this series I will guide you, step by step, on how to build a robust API server using Laravel.

Lifetime access for FREE!

Course Content

FREE What is MVC and Why? Explained in Plain English

MVC is one of the most widely used software architecture in modern web development. Let's explore its architecture in this lesson. Also read this tutorial on my blog: https://sam-ngu.medium.com/what-is-mvc-software-architecture-and-why-explained-in-simple-english-d8d7a3602f33

FREE Ep01 - Laravel's Architecture: A quick Overview on Directory and App Structure

Laravel is one of the most popular PHP framework today, and also my favourite web framework. Let's talk about how Laravel handles incoming request and a brief overview on Laravel's directory structure.

FREE Ep02 - Laravel Middleware and HTTP Kernel

Middleware are functions that runs before the request hits the router. Let's learn how Laravel uses HTTP kernel to execute the middleware and create our own middleware.

FREE Ep03 - Laravel Service Container and Service Provider

Laravel uses Service Container and Provider heavily in its architecture. They are considered as the most important part of the framework design. Let's dive in.

FREE Ep04 - Laravel Facade: What is it and how to create one?

Facade is another way to resolve a class instance out from the service container. It allows us to call instance method statically. Let's learn how we can create our own facade in this lesson!.

FREE Ep05 - App Overview and Introduction | Laravel API server

Let's build a simple Google docs clone!

FREE Ep06 - Database Design and Migration | Laravel API Server

Let's go through the database designing process and create the migration files for our app. Migrations are sort of like version control, but in the context of database. We will talk more about it in this lesson!

FREE Ep07 - Seeds and Factories | Laravel API Server

Data is essential to most apps. However we often don't have access to real world data while developing our app. Let's learn to create dummy data with seeders and factories in Laravel!

FREE Ep08 - All about models and Relationships | Laravel API Server

Let's learn how to build our model and connect the relationships together.

FREE Ep09 - Seeding relationships | Laravel API Server

Let's talk about how to effectively seed model relationships in our database.

FREE Ep10 - RESTful API Route Design and Laravel Routes

If we define API endpoints without following a standard, things will go wrong very quickly. Let's talk about the modern standard to setup our API endpoints.

FREE Ep11 - Laravel Resource Controllers for API Routes

Laravel allows us to define our controllers in dedicated controller class. Let's see how it is structured.

FREE Ep12 - Laravel API Routes Best Practices

You can define your routes' uri in anyway that you like. However, a well thought naming convention can go a long way. Let's explore that for a bit more in this video.

FREE Ep13 - Recursively Load PHP files in a Directory

Manually loading files one by one in a folder is not fun. Let's take a look at a better approach by using the PHP recursive directory iterator.

FREE Ep14 - Essential Eloquent Methods & Properties

Eloquent is Laravel's official ORM. It provides an easy API for us to work with our database. Let's learn the basics of Eloquent in this video.

FREE Ep15 - DB Transaction

Sometimes we need to run multiple database operations consecutively where each operation is dependent on its predecessors. However, there is no guarantee that all the operations are successful. Let's see how we can solve this with Transactions.

FREE Ep16 - Laravel Resource Class | API Resource

Consistent JSON response from an API server is one of the design fundamentals. It would be extremely frustrating to get different JSON structure on multiple API endpoints. Laravel makes it extremely easy for us to make our JSON response consistent, that is, through the use of Resource class.

FREE Ep17 - Pagination

Having our API server to return all of our database records from the index method is certainly not the right way. The appropriate way is to display the results on a page by page basis. Let's see how we can achieve this in Laravel.

FREE Ep18 - Repository pattern

There is a software design pattern called "Repository". It is basically a middle layer between the database and our app. Let's take a deeper look at it in this lesson.

FREE Ep19 - Exception

Getting our API server to handle exceptions in our app is not a trivial task. Error messages must be consistent and helpful. Let's look at how can we handle exceptions in Laravel.

FREE Ep20 - Event & event listener & subscriber

Event is one of the key features in Laravel. Let's look at how and why events are useful in a Laravel app.

FREE Ep21 - Sending email

Sending an email is one of the most essential operations in modern web apps. Laravel makes it extremely simple for us to send an email. Let's take a brief look at this.

FREE Ep22 - Unit Test vs Feature Test vs E2E Test

Shipping code is not a trivial task. A good development workflow should always have an adequate amount of testing before making a new release. Let's take a brief look at the standard testing practices in modern web development.

FREE Ep23 - Unit Testing Essentials

Let's look at how to get started with unit tests and some of my techniques to write good unit tests.

FREE Ep24 - Testing API routes | Feature Testing

Feature testing is the notion of testing a particular feature in our app, in other words, testing a group of functions together. Let's learn how to do so in Laravel.

FREE Ep25 - Phpunit with Live Reload?! Productivity Hacks

What if there is a tool to help us automagically re-trigger our phpunit tests whenever we modify our code? Let's find out more in this lesson.

FREE Ep26 - Composer Script | Productivity Hacks

Let's find out what is composer scripts and how they can help us to become 10x more productive.

FREE Ep27 - Test Driven Development (TDD) Basics | Laravel API Server

TDD is the notion of writing your tests first, then code. In TDD, we priortise to make our tests pass. Development is driven by passing tests, and hence the name Test Driven Development. Let's look at TDD in Laravel

FREE Ep28 - Opinion on Testing: how much is enough?

How much testing do we need? Do I really need testing for my project? These are the questions that we often ask ourselves in most projects. Let's discuss them a bit more.

FREE Ep29 - Validating Request

A golden rule in web development is that we should never trust the user input. Validating the incoming HTTP requests is a crucial step in our app. Let's learn how to do so in Laravel.

FREE Ep30 - Custom Validation with Validator

Laravel offers a flexible validation API through the validator class. Let's look at it at a deeper level.

FREE Ep31 - Laravel IDE helper

Laravel utilises a lot of magic methods and facades, and these mean most IDE can't autocomplete our code. Let's learn how we can fix this.

FREE Ep32 - Config and Env Var

Configurations are "global variables" that allow us to change our app's behaviours. Let's learn how that works in Laravel.

FREE Ep33 - Documenting API with API Generator

Writing API documentation doesn't need to be painful. Let's see how this wonderful package Scribe can help us to build our API docs.

FREE Ep34 - Throttle Middleware and Rate limiting

Throttling means to limit the number of requests in a given period of time. Let's take a deeper look at how Laravel implements this.

FREE Ep35 - Authentication with Laravel Fortify: An Overview

Laravel has an official package called Fortify that take cares of the heavy loads of authentication. We will explore everything that you need to know about it.

FREE Ep36 - Laravel Fortify: Auth Registration and Password Reset

Fortify made it easy for us to implement user registration. Let’s look at how the feature works.

FREE Ep37 - Laravel Fortify: Email Verification and Updating User Profile

Let’s see how we can get the user to verify their email before letting them use our app.

FREE Ep38 - Laravel Fortify: 2 Factor Authentication | Laravel API Server

Laravel Fortify made 2 factor authentication a breeze. We will dive deeper into the API endpoints provided by Laravel Fortify.

FREE Ep39 - Customising Fortify Email Verification

Fortify allows us to do a lot customisation. Let’s learn how to customise the verification email in this lesson!

FREE Ep40 - Customising Fortify Authentication

We will look at ways to customise the authentication logic in Fortify.

FREE Ep41 - Laravel Sanctum

Sanctum is an official Laravel package that aimed at making API authentication a breeze. Let’s see how we could integrate it with Fortify.

FREE Ep42 - Testing Auth

We now learned about authentication via Fortify and Sanctum, but what about implementing the tests for authentication? We will take a deeper look in this episode.

FREE Ep43 - Providing Translation - i18n | Laravel API Server

Providing translation in different languages (or i18n) can certainly help our web app to be more accessible.

FREE Ep44 - Creating private links that will expire in Laravel?! | Signed route

Laravel makes it easy to create signed routes that are extremely useful in applications that share resources.

FREE Ep45 - Notification

Sending notifications to app users is not hard at all! Let’s learn how we can send mail notification.

FREE Ep46 - Websockets: Concept Overview

Websockets is the technology that powers real-time web apps, but how do they work though?

FREE Ep47 - Laravel Websockets: Broadcasting Setup and Config

Let’s learn how we can setup websocket and broadcasting in Laravel.

FREE Ep48 - Broadcasting Events and Websocket Channels | Laravel API Server

We’ll learn how to broadcast our app events through websocket channels!

FREE Ep49 - Laravel Echo & WebSockets | Building a Chat App

Laravel Echo is the official client library for receiving websocket events. Let’s learn how we can use it in our app.

FREE Ep50 - Private and Presence Channels

Unlike public channels, only authenticated users will be allowed to join private and presence channels.

FREE Ep51 - “P2P” WebSockets?! - Whisper | Laravel API Server

Well, technically it is not P2P. Laravel Echo allows clients to talk to each other through the whisper function. Let’s discuss further in this lesson.

FREE Ep52 - Laravel Websocket: Sending Realtime Data With RPC

By default, Laravel doesn’t let us to send data to the server via websockets. However it doesn’t mean that we can’t. Let’s learn how to use Laravel Websockets to do that.

FREE Ep53 - Laravel Websocket with SSL

SSL is the answer for the client to securely transmit data to the server. However, setting up SSL for our websocket server could be a pain. Let’s learn more about it in this lesson.
What is MVC and Why? Explained in Plain English
MVC is one of the most widely used software architecture in modern web development. Let's explore its architecture in this lesson. Also read this tutorial on my blog: https://sam-ngu.medium.com/what-is-mvc-software-architecture-and-why-explained-in-simple-english-d8d7a3602f33
This site uses cookies and other tracking technologies to assist with navigation and to analyse site usage. By using this website you agree to our use of cookies. For more information about our use of cookies, please see our Privacy Policy. Your use of this site is also subject to our Terms of Use.