
Learn to create a rest API with Laravel and Docker in a practical course, including authentication, roles, products with images, orders, a dashboard, and data export.
Install Laravel and composer, run four commands in terminal, create a project named Laravel admin, start the server with Artisan serve, and verify in the browser that Laravel is installed.
Learn to connect Laravel with Docker by building a Dockerfile and Docker Compose for backend and MySQL; install PHP 8 Alpine, Composer, and run Artisan serve on localhost.
Add front end service that consumes the Laravel API, configure its image and port, and run docker compose up. Test the front end on localhost:88 after starting Laravel backend.
Test the database connection, set up the admin migrations, and create the users table with first name, last name, email, password, and timestamps using Docker Compose and artisan migrate.
Create your first Laravel API route in Docker, add a controller with a hello method that returns hello, and test the endpoint with Postman.
Register a new user by posting first name, last name, email, and password; hash the password, enable fillable and guarded properties, hide the password in responses, return 201 status.
Create a custom register request in Laravel, set authorized and validation rules, require first name, last name, email, password, and password confirmation, and apply it in the controller.
Install Laravel Sanctum to manage api tokens for user login and enable a stateless API; run migrations to create the personal access tokens table and update the user model.
Implement login in Laravel by validating email and password, returning a JWT token on success and an unauthorized error on invalid credentials.
Learn how to fetch the authenticated user with a JWT in a Laravel RESTful API using Laravel Sanctum middleware, including header authorization and bearer tokens to secure routes.
Learn to implement HttpOnly cookies for secure authentication in Laravel RESTful APIs, replacing authorization headers with a jwt cookie, and updating middleware to read the token from the cookie.
Implement logout by expiring the token cookie in the past and returning a success message; expose a logout API that posts to logout and tests unauthenticated access.
Explore how the Laravel IDE helper package enables autocompletion by generating helper files with Artisan commands, highlighting cookies and models, and adding helpful comments.
Create a Laravel user controller with the five RESTful methods—index, store, show, update, and destroy—then map them to API routes using API resource and verify with PHP artisan route:list.
Create, list, update, and delete users in a Laravel RESTful API, creating with first name, last name, email, and hashed password; respond with 204 for deletions.
Paginate the users list in Laravel with per page and page parameters to show 15 records per page, then seed fake users with a factory and Faker in Docker.
Explore adding and validating user-related requests for profile management in a Laravel RESTful API: create and update requests, authorize, update own info, and password changes via routes.
Create migrations for roles and permissions, build models and controllers, expose API routes, and connect users to a role with permissions, implementing full role-based access control in Laravel.
Add a role_id to the users table and create a foreign key to the roles table to establish a one-to-many relationship; manage migrations and test via the api.
Master one-to-many relationships in Laravel by creating role and user data via factories, defining belongsTo and hasMany relations, and exposing users with their roles through API responses.
Explore creating Laravel json resources to return id, first name, last name, email, and url for users, using JsonResource and collections, without wrapping in AppServiceProvider.
Master conditional eager loading in Laravel by using with and load on user resources to control when the role is loaded, optimizing single-user views versus lists.
Create and connect roles and permissions in a Laravel app by building a many-to-many relationship with a pivot table, migrations, and belongs to many associations.
Explore how to manage permissions and roles in Laravel using attach, detach, and sync for many-to-many relationships; seed roles like admin, editor, and viewer and assign permissions efficiently.
Create a product model with migration, define title, nullable description, image, and a decimal price, and expose it via a Laravel restful API using a dedicated controller, resource, and routes.
Create an image controller to upload files from requests, store them in the public path, and return a public URL while validating uploads as image types such as jpeg.
Define orders and order items in a Laravel rest API by creating migrations and models, linking order_items to orders via order_id, and exposing index and show endpoints through API resources.
Seed nested factories to generate orders and their order items with faker data, assign random dates, prices, and quantities, and attach 1–5 items per order.
Learn to use Laravel attributes to expose a computed total by looping order items and calculating quantity times price, enabling the front end to fetch totals from the back end.
Develop an export function to generate a CSV of orders and order items, with headers for email, product title, price, and quantity, downloadable as orders.csv.
Build a Laravel chart endpoint by joining orders with order items, summing price times quantity per day, casting to date, and grouping by date for daily chart data.
Define gates in a service provider to authorize view and edit access based on user roles and permissions, then enforce these gates in controllers to protect endpoints.
Test the front end by logging in as admin at Mint.com with password, then explore users, rolls, rules, images, and orders, confirming edits prefill and export options.
Document the api with open api swagger, install and generate docs via artisan, and annotate controllers with open api comments to provide version, title, description, contact, and url for browsing.
Authenticate to the user API using a bearer token in Swagger to fetch users. Generate the token with an artisan command, apply security, and access all users.
Add a page query parameter to the Laravel RESTful API to paginate users, test via generated docs, and fetch subsequent pages by supplying a lowercase, required integer page.
Shows creating a store user request with a required POST /users body defined by OpenAPI, including first name, last name, and email, plus token-based update and delete flows.
Document OpenAPI for Laravel REST endpoints, separate user and profile calls with Swagger tags, and implement authenticated requests, including user info and password update workflows.
Learn how to create an Admin App using Laravel Rest APIs.
In this tutorial you will learn:
How to create Rest APIs with Laravel
Authenticate using Laravel Sanctum
Authorization using Laravel Gates
Login with HttpOnly Cookies
Laravel JSON Resources
Install and use Docker
Upload Images
Export CSV's
Use Open API(Swagger) Documentation
If these are what you are looking for then this course is for you.