An Ecommerce Restful API using Laravel API Resource (Laravel Version 5.6, PHP version 7.2).
Features:
- Setting up the environment.
- Creating Model, Factory, Migtation for Products and Reviews.
- Creating API Resource Controller for Products : List,Show,Store,Update,Delete Products
- Creating API Resource Controller for Reviews : List,Show,Store,Update,Delete Reviews
- Setup migration to create tables Products & Reviews.
- Database seeding with faker library and factory for Products & Reviews.
- Creating one-many relationship between Product and Review.
- Transform product & Review model for your API.
- Setup environment in Postman.
- Implement meta links in API.
- Configure API Authentication - Passport package to provide authentication - Authenticated users can store/update/delete Products - Normal users can List/Show Products and List,Show,Store,Update,Delete Reviews
- Pagination feature is available on Products list.
- MYSQL dump of the database named ecommapi.sql’ is provided.
• Knowledge of Laravel php framework • XAMPP (start MySQL, Apache service) • Phpmyadmin • Php laravel (Laravel Framework 5.6, PHP version 7.2) • Text editor (Visual Studio Code) • Postman tool
Step 1: Download and add the folder inside ‘C:\xampp\htdocs’
Step 2: Open phpmyadmin http://localhost/phpmyadmin/index.php , create database ‘ecommapi’ and import database dump file ‘ecommapi.sql’ into it.
Step 3: Go to command prompt
c:\xampp\htdocs\ecommapi>php artisan serve
Use Postman tool for performing integration testing with your API.