Build from Scratch a Modern REST API with PHP 8
- Description
- Curriculum
- FAQ
- Reviews
Are you eager to master the art of building professional and efficient REST APIs using the latest features of PHP 8? Look no further! This comprehensive Udemy course will equip you with all the necessary skills and knowledge to create robust n-tier RESTful APIs using all the latest PHP 8 features!
Whether you are a seasoned PHP developer or a beginner looking to dive into API development, this course is designed to cater to your needs. Through a hands-on approach, you’ll learn step-by-step how to design, build, and secure a fully functional REST API from scratch.
Starting with the fundamentals, you’ll gain a solid understanding of the REST architectural style and its principles. You’ll explore the HTTP protocol and learn how to leverage its methods and status codes to create API endpoints that adhere to industry standards.
As you progress, you’ll delve into the world of PHP 8, discovering its latest features and enhancements that make API development more streamlined and efficient. You’ll learn how to set up your development environment, configure PHP for optimal performance, and harness the power of the PHP 8 syntax (such as the `match` expression, the PHP 8.1 `enums`, and so much more!).
Throughout the course, you’ll work on real-world projects, allowing you to apply your knowledge to practical scenarios. You’ll learn how to handle authentication and authorization, implement CRUD operations, handle error responses, and optimize your API for scalability and performance.
Moreover, you’ll explore best practices and design patterns for building clean, maintainable, and testable code. You’ll become familiar with popular PHP frameworks and libraries that simplify the API development process, such as Laravel, Lumen, and Slim.
In addition to these frameworks, you’ll also utilize essential Composer packages like RedBean and DotEnv PHP. RedBean provides an easy-to-use ORM (Object-Relational Mapping) solution for database management, while DotEnv PHP allows you to manage environment variables effortlessly, enhancing the security and portability of your API.
By the end of this course, you’ll have a solid foundation in creating RESTful APIs using PHP 8 and be ready to tackle complex API projects with confidence. Whether you’re building APIs for mobile applications, web services, or IoT devices, this course will empower you to unleash the full potential of PHP 8 for API development.
Enrol the course now and embark on a journey to become a proficient REST API developer with PHP 8!
-
44. Install Composer & PHP JWT (JSON Web Tokens)Video lesson
-
55. Create your first file!Video lesson
-
66. Include files and composer autoloaderVideo lesson
-
77. Creating the first endpoints in our service applicationVideo lesson
-
88. PHP 8.1 User & Composer requirementsVideo lesson
-
99. If needed, upgrade your PHP version to correct oneVideo lesson
-
1010. Use an API client (API clients: Insomnia - Postman)Video lesson
-
1111. HTTP methods for REST API architecture CRUDVideo lesson
-
1212. Implement User ClassVideo lesson
-
1313. Helpers and HeadersVideo lesson
-
1414. Add namespace and composer autoloadVideo lesson
-
1515. Implementing your first API RoutesVideo lesson
-
1616. Implement match and enum PHP 8.0 and 8.1Video lesson
-
17Finishing user routes and handling the requestsVideo lesson
-
1818. Read the API payload data from the backend serverVideo lesson
-
1919. Validate endpointsVideo lesson
-
2020. Implement the missing argumentsVideo lesson
-
2121. Setup Git project repositoryVideo lesson
-
2222. Add just-http-status-codes and php-http-response-header packagesVideo lesson
Install the following composer packages to our project
"just-http-status-codes" - https://packagist.org/packages/ph-7/just-http-status-codes
"php-http-response-header" - https://packagist.org/packages/ph-7/php-http-response-header
-
2323. Save our code on a Git hosting platform (GitHub)Video lesson
-
2424. Refactoring the payload validationVideo lesson
-
2525. Add support for generating UUID (GUID)Video lesson
-
2626. Setup RedBeanPHP ORM, and MySQL on development machineVideo lesson
-
2727. Handle exceptions beautifully and convert into JSON formatVideo lesson
-
2929. Set a default response on index root requestVideo lesson
-
3030. Rewrite URLs to beautiful friendly onesVideo lesson
-
3131. RedBeanPHP ORM in the Specific N-Tier Architecture of our API ApplicationVideo lesson
-
3232. Secure RedBeanPHPVideo lesson
-
3333. Codebase Quick CleanupVideo lesson
-
3434. Retrieve a user from the database with RedBeanPHPVideo lesson
-
3535. Retrieve all users from the database with RedBeanPHPVideo lesson
-
3636. Remove an existing user from the database (with RedBean PHP)Video lesson
-
3737. Update a saved user in the databaseVideo lesson
-
3838. Refactor PHP enum in user.routesVideo lesson
-
3939. Send proper HTTP status codes for each API endpointVideo lesson
-
4040. Clean Code - Write self-documenting code instead of commentsVideo lesson
-
41Let's create the Food ItemVideo lesson
-
4242. Validate the received HTTP methods for API endpointsVideo lesson
-
4343. Make sure a user has a unique email + save and encrypt passwordVideo lesson
-
4444. Optional - Move hash_password to its own functionVideo lesson
-
4545. Login a userVideo lesson
-
4646. Store the JWT expiry time into ENV variableVideo lesson
-
4747. Refactoring - Implement UserEntity into User Data Access LayerVideo lesson
-
4848. Refactoring - Create FoodEntity to build a food productVideo lesson
-
4949. Store JWT token into database tableVideo lesson
-
5050. Store user JWT token and last activity into the databaseVideo lesson
-
5151. Good practices and enhancementsVideo lesson
-
5251.1. Final API refactoringVideo lesson
-
5352. Start writing your unit tests. Setup and configure PHPUnitVideo lesson
-
5453. Add your unit tests - Part 1 (User Entity)Video lesson
-
5554. Add your unit tests - Part 2 (Item Entity)Video lesson
-
5655. Add CI GitHub workflows pipelineVideo lesson
In this video, you will learn how to create a CD automated pipeline with GitHub Actions to trigger your PHP unit tests on every commit pushed.
-
57PHP Unit Testing LibrariesText lesson
-
6158. Include all your files thanks to Composer!Video lesson
Further more about the Composer files inclusion - https://getcomposer.org/doc/04-schema.md#files
The spl_autoload that Composer autoload uses:
https://www.php.net/manual/en/function.spl-autoload.php
https://www.php.net/manual/en/function.spl-autoload-register.php
-
6258. Include all your files thanks to ComposerVideo lesson
Further more about the Composer files inclusion - https://getcomposer.org/doc/04-schema.md#files
The spl_autoload that Composer autoload uses:
https://www.php.net/manual/en/function.spl-autoload.php
https://www.php.net/manual/en/function.spl-autoload-register.php
External Links May Contain Affiliate Links read more