There are many terms when talking about the light and dark parts of the Internet, but their definition is quite simple.
The websites and social networks that average users are familiar with can be called in different ways:
What is PHP CS Fixer
PHP CS Fixer stands for PHP Coding Standards Fixer. This is a tool that fixes your code to follow standards. There are various PHP coding standards that you can follow, such as the popular PSR-1, and PSR-12 published by the PHP Framework Interoperability Group (the full list...
The difference between POST and PUT according to RFC
According to RFC 2616, § 9.5, POST is used to create a resource:
According to RFC 2616, § 9.6, PUT is used to create or replace a resource:
Let's find out which HTTP method should be used to create a resource.
Or should both be...
Idempotent HTTP methods
An idempotent HTTP method is a method that can be invoked many times without different outcomes. It does not matter whether the method was called only once or ten times. The result should always be the same. Idempotency essentially means that the result of a successfully...
Design Patterns are techniques for how to design and architect your code. They are low-level solutions related to the implementation to real-world problems that arise again and again, so instead of inventing the wheel, we follow design patterns that are well-proven, tested by...
Today, Linux is in great demand. You can see its use everywhere, on servers, desktops, smartphones, and even some electrical devices such as refrigerators. Some people consider Unix and Linux as synonyms, but that is not true. Let's take a closer look.
Before Linux and Windows, the...
A service class is a class that performs some business logic that you want to use in various places.
It is any PHP object that performs some sort of a "global" task.
When code does not naturally fit into one class or another nicely then you have a candidate for a service. For...
Invokable Controller is a controller that contains only one (__invoke()) method.
The __invoke() method is a magic method that is called when a script tries to call an object/class as a function.
Invokable controllers come in handy when you need to create a controller that does one...
The Linux /tmp directory
The /tmp directory in Linux-based systems contains the necessary files that the system temporarily needs, as well as other software and applications running on the machine.
For example, when you are writing a document, all the contents of that document are saved as a...
The only difference between hasOne/hasMany and belongsTo/belongsToMany is where the foreign key column is located.
hasOne and hasMany - you are telling Laravel that this table does not have the foreign key.
belongsTo and belongsToMany - you are telling Laravel that this table holds the foreign...
The active record design pattern (considered an architectural pattern) is an approach to accessing data in a database.
The active record is an object that wraps a row in the database table or view, encapsulates the database access and adds domain logic on that data. An object carries...