Amit Merchant
1,065 FOLLOWERS
Keep up with articles from Amit Merchant.
Amit Merchant
2d ago
When you’re working with service classes in Laravel that you would inject into your controllers or anywhere else, you might need to pass some configuration values to them ..read more
Amit Merchant
6d ago
You read more code than you write. And it’s true. When working on a large codebase, you might need to read a lot of code (written by others) to understand it better ..read more
Amit Merchant
1w ago
Sometimes what happens is that for some reason, you might need to back up your database tables ..read more
Amit Merchant
2w ago
When I wrote this article about adding support for showing app screenshots in the install UI, there wasn’t a way to do the same on the desktop ..read more
Amit Merchant
3w ago
Git is a de-facto standard for version control these days. And there’s no doubt that it’s a powerful tool that can help you manage your code and collaborate with others ..read more
Amit Merchant
1M ago
Being aware of the queries that are being executed in your application is one of the most important things to do if you want your application to be performant and scalable at all times ..read more
Amit Merchant
1M ago
Browsers have been getting some pretty important features at a rapid pace lately. Features that might take several JavaScript (or CSS) libraries to implement are now available in browsers out of the box ..read more
Amit Merchant
1M ago
A fingerprint, in general, refers to a unique pattern or characteristic that can be used to identify an individual or an object. This concept is widely used in various fields.
For instance, to uniquely identify a human, the unique patterns of ridges and valleys found on the surface of human fingers or DNA sequences are used.
Similarly, in web applications, the unique patterns of the HTTP requests made by a user can be used to uniquely identify them.
A request fingerprint can be formed by hashing various values of the request, such as the URL, IP address, user agent, and other parameters. The h ..read more
Amit Merchant
2M ago
When it comes to database performance, it would be primarily judged by the fact that how well the database can handle read and write operations.
The read and write dynamics
The master and slave approach
Laravel making it easy
In closing
The read and write dynamics
In high-traffic websites, for instance, e-commerce or social media websites, where a lot of read and write operations are going on simultaneously, the database would be the bottleneck.
For instance, in MySQL, read performance can be affected when write operations are performed concurrently since write operations may acquire locks t ..read more
Amit Merchant
2M ago
Generics in programming are a feature that allows you to define functions, classes, and data structures with placeholder types. This enables you to write more flexible and reusable code.
Generics are commonly used in statically typed languages like Java, C#, and C++. Dynamic languages like Python also support it.
Why generics?
Using Generics in Laravel
Explanation
Why generics?
Using generics can have multiple benefits:
Type Safety: Generics ensure that the relationships return the correct type of models, reducing the risk of runtime errors due to incorrect model types.
Better IDE Support ..read more