We haven't discussed each and every security threat, but we some things which needed to be taken care of to avoid security-related problems. We have discussed how we should secure our endpoints and how to implement authentication for RESTful web services. We also discussed flaws in our current code that we wrote in the previous chapter.
However, we haven't written code to make our code better and more secure. We can do this, but we should understand that there is already a lot of stuff to utilize instead of doing everything from scratch. So instead of writing everything in plain PHP by ourselves, we will use available code. It is not only to save time but also to use something that is available in the community and is time tested by the community.
So if we have made up our minds to use a third-party code snippet, package, or class, then we should understand that in PHP there is not one group of developers writing code in one framework. There are lots of PHP classes...