Laravel API Master Class
In this workshop series, you'll learn how to design, version, build, and protect a web API using Laravel. We'll begin from scratch with a basic Laravel project, and construct a fully-featured API one lesson at a time.
Series episodes
What You Need (2)
Status 200
7m 59sBuild a Laravel API from scratch with simple JSON routes. Learn to create a reusable trait for clean, consistent JSON responses in your controllers.
Working with Postman
9m 11sDiscover how to use Postman, the powerful HTTP debugger, to test and work with web APIs effectively. Boost your API development with the right tools.
Setup the System (4)
Designing the Url
8m 4sDesign clear, logical URLs that act as your app’s user interface. Learn to craft intuitive web API endpoints users will love to interact with.
How to Version Your API
9m 28sLearn how to version your API to prevent breaking changes and keep your project organized. Implement smart versioning strategies for a smooth client experience.
Authentication Using Tokens
9m 10sLearn to authenticate API clients using Sanctum tokens. Secure your routes effortlessly by generating tokens and applying Sanctum middleware in Laravel.
Revoking Authentication Tokens
9m 1sLearn how to revoke authentication tokens and set expirations to keep your API secure. Protect your app by managing client access with ease and confidence.
Responding to Requests (6)
Designing Response Payloads
11m 30sTransform Eloquent models into clean, secure JSON responses. Learn to design well-structured API payloads that deliver exactly what clients need.
Conditionally Omitting and Including Data
11m 35sLearn to conditionally include or omit data in JSON responses using JsonResource. Tailor your API output for different routes with clean, flexible resource classes.
Using Optional Parameters to Load Optional Data
11m 44sLet clients load optional relationship data using an include query parameter. Optimize responses by giving control over what data gets returned in your API.
Writing Filters
16m 16sLearn to write filters that map query parameters to filter class methods. Empower clients to easily customize data retrieval in your API with clean, flexible code.
Using (and Filtering) Nested Resources
6m 52sLearn to filter nested resources like tickets by author ID using relationship query parameters. Keep your API consistent, flexible, and easy to use.
Sorting Data
13m 3sEnable clients to sort API data effortlessly on any attribute. Build flexible, user-friendly endpoints that make data access smooth and efficient.
Handling Requests (4)
Creating Resources with Post Requests
16m 41sLearn how to create resources with POST requests in your API. Empower clients to add data easily while building a robust, interactive application.
Deleting Resources with Delete Requests
8m 11sLearn how to easily delete resources in your API using delete requests. This straightforward guide helps you implement clean, effective resource removal in Laravel.
Replacing Resources with Put Requests
14m 17sUnderstand the difference between PUT and PATCH requests! Learn how to properly replace resources in your API for clean, effective Laravel updates.
Updating Resources with Patch Requests
10m 26sLearn how to update resources efficiently with PATCH requests in Laravel. Focus on modifying only provided data for precise, flexible API updates.
Controlling Access (3)
Using Policies for User Authorization
7m 45sMaster user authorization with Laravel policies! Learn how to control user actions on specific resources for secure, precise access management in your app.
Controlling Access with Token Abilities
13m 1sUse Sanctum’s token abilities to easily assign roles and permissions without extra packages. Simplify access control and secure your Laravel app today!
Applying Granular Permissions
11m 18sControl user actions precisely by applying granular permissions with token abilities. Secure your app by managing who can change what effortlessly.
Implement Those Controllers (2)
Implementing the AuthorTicketsController
11m 31sBuild the AuthorTicketsController by applying filtering, request handling, and permissions. Create clean, efficient code that powers your ticket system seamlessly.
Managing Users
16m 38sLearn how to manage users with proper permissions in your app. Build secure, efficient user management that complements your ticket system effortlessly.
Some Important Topics (3)
The Principle of Least Privilege
7m 34sImprove your validation by applying the Principle of Least Privilege. Write cleaner, safer code that minimizes risks and keeps your app secure and efficient.
Handling Errors
17m 22sMaster error handling by creating consistent JSON responses using Laravel’s global exception handler. Keep your app robust and user-friendly with ease!
Documenting Your API with Scribe
25m 46sAutomate your API docs with Scribe! Learn how to create clear, easy-to-maintain documentation that saves time and helps your API shine.




