If you’ve ever worked with JavaScript, you might be well aware of this feature. So basically, from PHP 7.4, you would be able to unpack arrays into another array using spread operator [...].| Amit Merchant
PHP, as a language, is ever-changing and ever-evolving. It’s not a language it was 10 years ago. This is all because the PHP’s core team which has been constantly improving minor things that might not look significant at first glance but when fixed/implemented, can dramatically improve the overall developer experience.| Amit Merchant
Enums or enumerations or enumerator types are those little data structures that can be used to define a set of named values. More like constants. For instance, a contract status which can be “permanent”, “temp”, or “apprentice”. Or a order status that can be “ordered”, “dispatched”, “shipped” etc.| Amit Merchant
If you are a PHP developer, you might have heard about or worked with Spatie’s Ray, a popular debugging tool that allows you to send debug information from your PHP applications to a desktop app for easy inspection at some point.| Amit Merchant
I recently came across this video by Kamran Ahmed, where he demonstrates how to resize any DOM element using just two lines of CSS. And I was like, “What the heck, how did I not know about this all this time?”| Amit Merchant
A blog on PHP, JavaScript, and more| Amit Merchant
The team behind Chrome has been on a roll when it comes to shipping cool yet useful features over the past few months. Last May, they shipped the support for the new if() function in CSS and, before that, tools to help write better with AI, among other things.| Amit Merchant
Designing PDFs that look great is a hassle. There are very few apps that do it right. Automating PDF generation from those good designs is even harder.| Amit Merchant
As every year, we will have the new version of PHP this year too, which is PHP 8.5. It’s the minor version in the PHP 8 line, and the version will be released later this year. Let’s discuss everything that has been added in PHP 8.5 so far.| Amit Merchant
Today, We are going to build a progressive Notepad app which can very well be used in offline mode, be responsive on all available devices, and saves the content locally on the device itself.| Amit Merchant
When writing functions or methods in PHP, we often return values that are crucial for the caller to handle. Usually, those returned values need to be consumed. Check the following example.| Amit Merchant
Themes in Shopify can only take your Shopify store so far. They work—until they don’t. You will run into walls once you want full control over UX, performance, and creative freedom. That’s where shopify headless commerce steps into the spotlight.| Amit Merchant
Icons play a crucial role in web design, enhancing user experience and visual appeal. While there are numerous free resources available, sometimes investing in high-quality, premium SVG icon sets can be worth it for their unique styles and extensive libraries.| Amit Merchant
The newest release of PHP, v8.1, is around the corner and it will introduce a whole lot of new features, from the read only properties to the native enums. It’s pretty exciting!| Amit Merchant
CSS is kinda-sorta becoming a true “programming language” with each passing day. With the introduction of new features like CSS variables, the calc() function, The pseudo-classes like :has() and :is(), and the ever versatile @media queries, CSS is making it easier to write complex styles and layouts.| Amit Merchant
PHP 8.5 is set to introduce a new operator called the pipe operator (|>). This operator allows you to pass the result of one expression as an argument to another expression, making your code cleaner and more readable.| Amit Merchant
About only 2-3 years ago, if you wanted to install PHP on your system, you had to go through a long and tedious process of downloading the source code, compiling it, and then installing it.| Amit Merchant
Today, if you want to get the first or last element of an array in PHP effectively, you can use the reset() and end() functions respectively.| Amit Merchant
When you cache a value in Laravel, it’s stored in the cache store (like Redis, Memcached, etc.) and can be retrieved later. This is great since it prevents expensive operations like database queries or API calls.| Amit Merchant
While Laravel’s Eloquent ORM is pretty powerful and covers all the bases for most of the use cases, there will always be something that is missing. In other words, there will always be a feature that you don’t need until you need it.| Amit Merchant
I got introduced to macOS back in 2018 at the workplace and since then I’ve been in love with the operating system and the entire ecosystem. There is something about the Mac apps that makes them so delightful to use. Most of these apps are well designed, intuitive, and are a pleasure to use.| Amit Merchant
View transitions are a great way to make your website feel more dynamic and engaging when users navigate between pages. The View Transition API, in particular, lets you create animated transitions between different website views.| Amit Merchant
Document conversion can be a pain when you’re dealing with multiple file formats. And if you’re building an application that involves document conversion, it becomes even more challenging.| Amit Merchant
Since technology is evolving at light speed, those organizations that use legacy software are under immense pressure. Legacy software slows down business processes, increases their vulnerability to security attacks, and limits scalability.| Amit Merchant
AI coding agents are the new trend in the tech industry. They are designed to help developers write code faster and more efficiently. These agents use machine learning algorithms to understand the context of the code and provide suggestions to the developers.| Amit Merchant
Laravel 11.x already has a whereRelation method that lets you query relationships directly. However, there were a few query methods that can be made simpler when using relations.| Amit Merchant
PHP is one of the most popular programming languages in the world. It’s been around for a long time and has a huge community of developers. It’s used for everything from simple websites to complex web applications. If you’re learning PHP, you need a good development environment to practice.| Amit Merchant
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.| Amit Merchant
I soft-launched a new project called MacTreasure.com last week which was on my radar for quite a while. At least from the time I switched to being a macOS user.| Amit Merchant
When working with large datasets, you might need to delete millions of records from the database at once. Doing so can be quite slow and resource-intensive. And in doing so, you might run into memory issues, timeouts, and other problems.| Amit Merchant