
Learn how to design a restful API to expose database tables, secure endpoints with token-based authentication, implement authentication flows, and apply role-based access rules.
Prepare the development environment for a PHP REST API: set up a computer, install tools, ensure internet access for libraries, and prepare API tooling.
Explore Laravel 12 for REST API development with built-in real-time features for chat apps and dashboards, interactive comments, plus improved routing, testing options, and support for modern PHP features.
Prepare your Laravel 12 environment by installing via composer and the Laravel CLI, then verify Node.js, npm, and PHP versions before starting to build the Laravel application.
Configure PHP for Laravel 12 by setting up content security policy environments and enabling extensions, with SQLite as default and MySQL or Postgres drivers ready for a rest api project.
Build a hello world rest API in Laravel 12 with get, post, put, and delete endpoints at api/hello, returning json messages and server timestamps.
Build a calculator API with Laravel 12 using a DTO, a calculator service, and a controller. Register routes and test with Postman for JSON responses.
Build a CRUD rest api for product management with Laravel 12 and MySQL, implementing an api resource controller and routes for index, store, show, update, destroy.
Build a Laravel REST API to upload files and user details via multipart form data, store the file in public storage, and save name, email, and phone in the database.
Build a Laravel 12 rest API with sqlite testing, implementing a JWT-like token for authentication and protected routes; includes register, login, profile, and logout endpoints, with migrations and middleware.
Explore building a calculator REST API with Laravel, implementing add, subtract, multiply, and divide operations, using Postman for testing and a simple RESTful PHP Laravel project.
Create a Laravel 8 project by initializing a new local server, ensuring internet connectivity, and preparing the project structure to continue building the PHP REST API.
Create a calculator REST API by receiving user input, converting to integers, performing multiply and divide, and returning the result as a JSON response in an API controller.
Configure rest api routing in Laravel by organizing controllers, grouping requests with prefixes, and testing endpoints with Postman to ensure efficient and scalable api traffic.
Learn to test a php rest api in laravel using postman, configure headers and json bodies, and send requests across routes to validate responses.
Overview of building crud resource APIs in a Laravel 8 project, exposing a product resource with insert, update, and delete operations, and using MySQL for testing.
Configure the database to connect to a local MySQL server, set up schemas and users, and enable route access for the application.
Create a new Laravel 8 project, name it, place it in a folder, and open it.
Configure the database on a Laravel 8 project by specifying the IP address or localhost, database name, user, and password to begin modeling your project.
Create a product model with a migration, define fillable fields such as name, stock, and price, and migrate locally, then implement a list API for the product table.
Seed the product table by running a seed script to populate sample product records in the Laravel 12 MySQL project, then refresh to verify labels and data appearance.
Create a product controller to expose a RESTful API in Laravel, implementing index, show, store, update, and delete, wiring routes with a resource API routing setup.
Test resource rest APIs using Postman by creating, retrieving, updating, and deleting products, fetching details, and validating json responses from the server.
Explore token-based authentication and authorization in a Laravel project, using MySQL and Postman to test user registration, login, and access control.
Prepare the database by setting up a new schema, configuring user permissions, and applying changes as you start a Laravel project.
Create a Laravel 8 project by using composer templates, navigating to a local folder via the terminal, and starting the project with the generated structure.
Configure the database in the Laravel project by editing the entry file, set up tables, and establish a demo token for testing the project.
Configure Laravel Sanctum to work with API tokens, set up the token API, and configure providers and the default web setup in a Laravel 12 PHP REST API project.
Build a Laravel REST API controller to register users, log in, and log out, validating email and password, creating users, issuing tokens, and protecting routes with token middleware.
Test REST APIs with token-based authentication using Laravel Sanctum. Learn to obtain a user token, set Content-Type to application/json, and make authenticated requests to protected endpoints.
Build a change password API endpoint for iTunes password API token in a Laravel PHP REST API, validating current credentials, deleting the token, and returning the new token in JSON.
Build a PHP RESTful API with Laravel and Passport to implement OAuth2 authorization, token-based access to a resource server, and a complete flow from registration to Postman testing.
Prepare the project database and schema, and set up demo databases for development and ongoing work.
Create a Laravel 8 project, review the project structure, configure the public directory, and learn how to organize sources within the app.
Configure the database for a Laravel 8 project, setting up a PHP REST API with MySQL, OAuth2, and JWT to enable roles-based access.
Install Laravel Passport into the project via the terminal, configure the package, and verify the new Passport tables.
Configure oauth2 with laravel passport on the project by installing passport, setting up access clients, generating public and private keys, configuring providers, and customizing token settings for your needs.
Create and configure a user registration controller in the Laravel REST API, then test the API for public users and validate the registration workflow.
Configure api routing by applying middleware with Laravel Passport for oauth2 authentication, define public and protected routes, and prepare test controllers for api endpoint testing.
Test oauth2 password grant tokens in a Laravel passport setup by creating a client, obtaining a token, and accessing protected endpoints with json requests.
Build a PHP restful api with jwt token-based authentication using Laravel and the passport library, implementing registration, login, logout, and jwt testing, with routing and Postman testing.
Prepare database by creating a schema, setting up permissions, selecting the database, and applying settings to start a new project.
Create a Laravel 8 project by opening the terminal, naming your project, and using Composer templates to scaffold and configure resources; modify and reconfigure as you follow the workflow.
Configure the database in a Laravel 8 project by locating the database file and verifying the table structure with artisan commands.
Install the jwt token library into the Laravel project, configure environment settings and the secret key, and align token handling with the project's authentication setup.
Configure a JWT token on the project by updating the user model, implementing custom claims, and integrating the API provider to support roles-based access.
Create a Laravel 12 API controller for user registration, login, and logout, validate email and password, and generate and return authentication tokens.
Create a jwt api testing controller that exposes a public hello endpoint and a protected route requiring a token, demonstrating access control for jwt-secured endpoints.
Configure api routing by organizing controllers and securing routes with token-based authentication using Laravel Passport (OAuth2), enabling public and user-only endpoints and testing the api.
Test REST APIs with jwt token based authentication using Laravel Passport by obtaining a token through login with email and password, then authorize requests with the token.
Master role based token authentication for a php rest api using Laravel 12, MySQL, OAuth2, and JWT, with admin restricted access and practical role based access rules.
Prepare the database for the PHP REST API by setting up resources, defining token-based access, and configuring project structure for Laravel 12, MySQL, OAuth2, and JWT workflows.
Create a Laravel 8 project and apply core logic to build your PHP REST API skills within this Laravel module.
Configure a token-based, role-aware database by designing a rules table and a user-rule pivot, mapping users to roles, and validating permissions within the Laravel project.
Modify the user model to combine users and rules, declare inputs, and loop through available rules to check rule names, enabling rule-based checks within the application.
Seed the roles table by running an artisan script to insert three roles, such as admins and managers, and verify the data in your Laravel project.
Configure api authentication in laravel 8 with sanctum by setting up and managing tokens and their lifetimes, from minutes to 24 hours and up to three days.
Create APIs for registration, login, and logout by building a user model, validating name, email, password, and role, storing users, and issuing and revoking tokens.
Build a middleware in Laravel 12 to verify user tokens and enforce roles-based access by checking the token and ensuring users have the required role.
Build a controller to test role-based token authentication in a Laravel 12 app, assign public access, admin, and manager roles, and verify protected routes.
Configure api routing in Laravel 12 by organizing routes with middleware to enforce token authentication and role-based access for admin and user, including a public endpoint.
Learn to test rest APIs with role-based token authentication (rbac), handling admin and manager access, login flows, and sending authorized requests.
Build a calculator rest api with add, subtract, multiply, and divide operations using PHP Laravel, and test it with Postman; begin a new project in the next section.
Create a project with composer and php arisan using composer create-project and name it calculator, then open in Visual Studio Code to modify a controller and set up API routes.
Create a simple calculator api by generating a CalculatorController with php artisan and routing /api/add in api.php, handling input to perform add, subtract, and multiply and return json.
Start the project with php artisan serve, test the api using Postman by posting JSON to /api/add, observe the response, and update routes/api.php to use /api/calculator/add.
Updates:
Updated April 2025: PHP 8.4.x and Laravel 12.x
Updated September 2021: PHP 8.x and Laravel 8.x
This Bootcamp is designed for web developers and any developer who wants to build RESTful API using PHP and Laravel. The Bootcamp consists of various technical projects that are constructed with step-by-step approach. Starting from a simple RESTful API. You will learn how to create calculator APIs.
Then, you build REST APIs to publish database tables. This project is integrated with database MySQL and Laravel. You can learn how to implement REST API with HTTP GET, HTTP POST, HTTP PUT and HTTP DELETE.
Next, we build PHP RESTful API security to secure your REST API applications. We have three project scenario. We will implement token based authentication, OAuth2, JWT Token and Role-based token authentication (RBAC).
All projects are guided with step-by-step so you can follow easily.
You will learn:
How to build a simple RESTful API using PHP with Laravel
Make database tables as REST API with implementing CRUD (Create, Read, Update, Delete) operation
Apply PHP REST API security using token based authentication (Laravel Sanctum)
Work with OAuth2
Work with JWT token
Work with Role-based token authentication
The following is requirement environment in this bootcamp:
Computer with installed Windows, Linux or macOS
Having knowledge of PHP basic programming
Having knowledge of general web programming