A cheat sheet for Laravel’s Eloquent ORM version 5.5.
In this demo we have 2 models (Owner and Car), and 2 tables (owners and cars).
The Owner can own one Car.
The Car can be owned by one Owner.
First let’s start with why design patterns exist! Developers have noticed that they seemed to be approaching problems in similar ways in a bunch of different software’s, then they decided that it would be pretty useful to be able to talk about those approaches using a common vocabulary, so they wouldn’t have to keep explaining what they were referring to. Thus they figured out general versions of these common practices and gave them names like “Adapter” and “Singleton.”
A design pattern is only a description or template for how to solve a problem! that can be used in many different…
It’s never been easier for me and for anyone in the community to build and share PHP Packages.
In this article, I will show you how I build my PHP packages really quick.
I’ll start by listing my steps for developing a modern PHP package:
These steps are required by almost every modern PHP package:
Hi again, in this article I will share with you some aspects I keep in mind when building an API, in the hope of helping you build a better API.
First thing you need to understand and definitely consider when designing your API, is REST “Representational State Transfer” the ‘standard’ design architecture for building APIs.
The key principles of REST involve separating your API into logical resources. And these resources can be manipulated using HTTP requests where the method (GET, POST, PUT, DELETE, PATCH) has specific meaning.
RESTful principles have gained a wide adoption lately.
Example of RESTful API Endpoints…
To build and run a web application, you need to install few software’s/tools and configure them. You can, of course, install those software’s and tools manually on your machine (your own operating system). But this can lead to some troubles! and has some limitations, such as reinstalling everything whenever you change your development machine (computer, laptop), switching between software versions, using the same port for two different software’s, sharing the application with other people when you have made some special configurations to the environment, etc…
The solution to all of the mentioned troubles would be to ship the development environment…