
Learn more about the instructor, his experience and knowledge, and the motivations for the creation of this course.
First fundamental topics about RESTful APIs and how to take advantage of the different contents depending of your skills.
Through the question system, you can solve your doubts, but it is very important that you ask them in the right way to help you better.
XAMPP is a multi-platform project that allows you to easily manage different services like Apache, MySQL, PHP, among others. During this class we will install them, mainly to use PHP in the system
Composer allows you to install and manage dependencies of multiple PHP projects, which includes Laravel. During this class, you will see how from the PHP installation of the previous class you can easily install composer.
Virtual Box is a very popular Oracle project for hardware virtualization, allowing the creation of virtual machines of any kind within your system.
Vagrant is a project that will help you to manage virtual machines completely configured and prepared for different tasks within Virtual Box.
Sublime Text 3 is the recent version of one of the most popular code editors. It is used for development in multiple programming languages and counts with a very active community that offers an infinity of plugins and packages to improve ts functionalities.
Through Git Shell you can run multiple advanced commands that are not available on Windows systems. It is highly recommended to install this tool to follow the course without problems and access a variety of commands that are not available natively on Windows. If you use another operating system, you can skip this step. However, that can also be a great tool
Node is a system mainly useful for tasks related to the frontend. We will install it, to access NPM which facilitates the management of dependencies for the frontend. It is like Composer, but instead of PHP, it's for CSS and JavaScript.
Postman is a very popular tool in the APIs ecosystem. Through this program, we will be able to make any requests to our API and check all the functionalities class by class.
During this class you will learn how to get the initial basic structure of any Laravel project, using composer.
Homestead is a vagrant box that will allow us to quickly build a complete virtual machine designed for Laravel projects primarily. Homestead is a project of the organization Laravel and is regularly updated with great contributions from the community and the maintainers
Take some notes of an additional step to follow if you are using Laravel 6.0
Let's resolve some possible confusion with the usage of Laravel Vite over Laravel Mix
Through a file called Homestead.yaml, within the project, you can easily configure the main features of Homestead, such as IP address, database name, project location, the amount of memory and CPUs, and others.
To use the virtual domain assigned to the Homestead virtual machine is necessary to indicate to our system, where to send the requests, once we try to access the chosen domain (restfulapi.dev)
During this class, you will know the main commands needed to manage your virtual machine with Vagrant. Commands for creating, destroying, starting and shutting down, along with connecting through SSH to it. It is recommended to use Git Shell, especially on Windows, for the SSH connection.
Find out how Composer can be used to keep the project dependencies up-to-date, without running the risk of introducing changes that break the correct operation of the project.
Package control is the initial step that opens the door to a vast world of packages and plugins for Sublime. Using package control, you can install all packages available for Sublime Text.
Learn how to create and manage your projects with Sublime Text 3, so you can keep your development space tidy and easily access your code.
SublimeCodeIntel is a standalone tool for Sublime Text that facilitates browsing through the definition of different classes, methods, and variables of the project, as well as the internal code of Laravel or other packages.
When installing SideBarEnhencement, you can access advanced features in the sidebar, such as advanced search, creation, deletion, file management, and much more.
Through SublimeLinter for PHP, you can quickly detect errors in the code, thus helping a more reliable and fast development process.
With PHPCompanion, you get access to multiple functionalities among which, the possibility of automatically resolving the location of the definitions that have the sentences "use" of your project. Avoiding having to access them manually or have to memorize them.
Let's go one by one with the different models/entities/resources that will conform the RESTful API, its attributes names, characteristics, and relationships between them.
End-Points are all possible routes or URLs that the API will provide to bring different options, resources, and utilities. During this class you will see a complete list of all of these, how every end-point work, their names, actions, methods/verbs and some more details.
During this class, you will be able to familiarize yourself with the fundamental components of Laravel, the location of the most elemental elements such as models, views, controllers, and much more.
PHP Artisan is one of the attractions of Laravel. It allows generating code, along with direct interaction with the application from simple console commands. During this class, you will see how to access the list of PHP Artisan commands, how to get specific help for any command and more.
Environment variables are values that should usually change between one environment and another, for example, access to the database is surely different on your local computer than on your production server. In this class, you will see How these variables work, where they are located and how they are used from the different Laravel configuration files.
During this class, you will see the main changes that the route system has undergone in the most recent versions of Laravel and how you can now correctly separate your routes according to the type of application you are developing.
We are about to start with the code, and it is possible that errors may arise along the classes. Find a good way to solve common mistakes and have an excellent guide to the original source code of the project.
During this class, you will see how to generate the initial structure of the models of the system, along with their migrations through the use of PHP artisan commands. Remember that the order of the migrations is crucial, so you must pay attention to the order in which each model is created with its respective migrations.
As in the previous class, it is also possible to create the initial structure of the controllers using PHP artisan commands. During this class, you will see the creation of resource controllers that allows implementing the CRUD operations for every resource.
As with resource drivers, resource type paths also exist. As expected, these routes make it easy to link a given URL and resource with a particular action of a controller. You will see how some paths only use a small set of methods, but not all of them.
During this class, you will add the properties of the Category model, indicating which of those can be assigned massively with the $fillable attribute.
During this class you will add the properties of the Product model, indicating which of the attributes of this model are $fillable, along with those that should be hidden
During this class, you will add the properties for the Transaction model, indicating once again which of the attributes of this model can be assigned massively with the $fillable attribute.
During this class, you will complete the list of fillable attributes according to the design of the API, along with the attributes that will have to be hidden.
In this class, you can build the different relationships between models. You can, mainly, learn the relationships "one to many" and "many to many," along with the importance of the location of the foreign key in the models.
From Laravel 5.4 the charset of the database was changed by utf8-mb4, making it heavier than normal. This change causes some inconsistencies with some previous versions of MySQL and MariaDB for which it is necessary to implement a solution.
In this class, you will add all the attributes required for the "users" table. That can be done, implementing a migration for this table.
In this class, you will add the attributes that make up table categories, according to the design of the API.
In this class, you will add the attributes that make table products, according to the design of the API using migrations.
In this class, you will add all attributes required for the transactions table. Which you can do programmatically through a migration for this table.
To solve the many-to-many relationship between product and category, you need to create a pivot table. Note that the order in the name of this migration is very important.
Through the factories, it is possible to automatically generate fake instances of the models (generated with Faker). In this class, you will see how to build the factory to instances of User.
Build the factory for the category model and thus be able to generate instances automatically.
Build product instances, based on fake data, through the factory.
Automatically create instances of Transaction implementing this factory.
Once the factories are created, it is necessary to use them from the DatabaseSeeder, to indicate the order in which they will be executed and the number of instances to create for each model.
Once you have created the factories and the seeder that use those, it is time to execute the whole process, using a PHP artisan command. On the way, you will see how to solve some errors that were committed in the process.
So you need to build a RESTful API for a project, but you do not know even where to start? Do not worry I will guide you through the whole process to build a genuine RESTful API using Laravel.
Join the more than 5.000 students already taking this course, building their RESTful APIs using Laravel, and enjoying every single class!
Note: You can take, and in fact it is recommended, to follow the course using the most recent version of Laravel. Additionally, the course includes extensive sections about how to upgrade your project to different versions of Laravel, in case you decide to use any previous version.
Build your RESTful API with Laravel, using a complete marketplace as the case of use. With Laravel, creating every component will be a breeze. You will have a project with users, sellers, buyers, transactions, products, and categories. Explore all types of relationships, one to many, many to many and much much more using Eloquent the Laravel ORM.
The full guide for creating a real RESTful API with Laravel. You can follow the course using the latest Laravel version (it is recommended).
You will not find a Laravel course like this. This course explains everything you need to develop a RESTful API using the Laravel framework.
At the end of the course, you will have a RESTful API with Laravel, for a market system, where users can purchase and sell different products with different categories and transactions. Inclusive, the same user can be both a seller and a buyer (you will take advantage of inheritance for this).
¡Do Not wait anymore! Become a master in the development of genuinely RESTful APIs with Laravel. Join the course now and see you in class
Remember: The course has been constantly updated to use the latest versions of Laravel. So feel free to use the version you like (especially the latest version of Laravel).
In this course, you learn how to develop a realistic, fully implemented, and professional RESTful API with Laravel.
Laravel is the most popular PHP framework, with more than 20 million downloads along with lots of enterprise and personal projects worldwide. Additionally, it includes fantastic features to implement a RESTful API easily. Laravel is RESTful friendly.
What is a RESTful API?
A Web API is like a web service that works entirely with HTTP. A RESTful API must follow the REST (REpresentational State Transfer) practices, allowing to orientate the design to the resources, provide standard responses based on the different HTTP status codes, and the corresponding according to Hypermedia Links in responses (HATEOAS).
Why Laravel?
Because Laravel is a framework made by programmers for programmers, expressive, simple, intuitive, and powerful. Laravel provides useful features for web projects including RESTful APIs.
Each new Laravel version includes many changes that make this framework even better, simple, programmer-friendly, and at the same time much more powerful. In fact, the latest versions of Laravel included a lot of new features to help to develop RESTful APIs in the right way.
During this course, you will master the complete structure of Laravel, along with the new features included in the latest version of Laravel to develop an actual RESTful API.
You will learn this about the development of a RESTful API with Laravel:
Using the Laravel PHP artisan for code and components generation
Usage and creation of middleware on Laravel
The Laravel Resource routes and controllers (ideal for RESTful APIs)
Fully supported JSON format responses for a JSON RESTful API
Validation of requests directly from the Laravel Controllers
Handling all types of exceptions and errors from Laravel handler
Complex operations involving up to three resources/models for a specific operation
Usage of Laravel dependency injection and model binding
Generation of the database structure using Laravel migrations
Automatic insertion of fake data into the database through "faker," using Laravel factories, and seeders
Laravel Sessions and access_token authentication for the RESTful API. Yes, Both!
Using Laravel Passport to protect the RESTful API with OAuth2
Pagination of results using Laravel collections
Using URL parameters to execute actions (the RESTful approach)
Sorting results based on URL parameters with a RESTful approach
Filtering results using URL parameters
Caching responses using Laravel Cache System
Limitation of requests using the Laravel middleware
Implementing HATEOAS on Laravel (a pure RESTful API must use HATEOAS)
Using PHP Fractal for transforming responses
Usage of CORS on the API responses to allow JavaScript-based clients and web browsers.
Use the Laravel Policies and Gates to handle the user's authorization layer.
Much more!!
You can take a look at the full list of contents below. You will finish with a complete RESTful API and understanding a lot of Laravel skills.
You will create an actual RESTful API from scratch and step by step using Laravel. Follow the REST architecture and build appropriate URLs to identify actions and resources using the Laravel best features and learn Laravel in the way.
Take full advantage of tools like Sublime Text 3, Git, power shell, Laravel, Composer, PHP artisan, and be more productive for agile development.
Note: In few classes of the course I use Windows (only for the first classes), but I included specific directions in the case you use Linux or Mac and all the tools used are cross-platform, so you will no have any problem.
You will have lifetime access to the current classes and the classes that I will regularly add (take a look at the last section to see what is coming).
At the end of this course, you will be able to develop your pure RESTful API with Laravel in an efficient way with the best practices, taking advantage of the facilities provided by Laravel for the proper implementation of your projects and your RESTfulAPI.
Do not wait any longer. Join the course and see you in classes.