The new Number utility in Laravel
November 22, 2023 — PHP has this NumberFormatter
class which is a part of the intl
extension. This class is used to format numbers based on the locale. I covered this in one of my previous articles.
A blog on PHP, JavaScript, and more
November 22, 2023 — PHP has this NumberFormatter
class which is a part of the intl
extension. This class is used to format numbers based on the locale. I covered this in one of my previous articles.
November 20, 2023 — You know Laravel has this neat Blade directive called @error
which you can use to display the validation error message for a given field. For instance, if you have a name
field in your form and you want to display the validation error message for it, you can do it like so.
November 18, 2023 — Sometimes you may want to skip a PHPUnit test conditionally. For instance, you may want to skip a test if the PHP version is less than 7.4 or if a certain extension is not installed on the system.
November 7, 2023 — Imagine a scenario where you’re stuck with an issue related to your server and you might not be able to solve it without the help of your colleague.
November 6, 2023 — To build a reading progress bar, the one that shows the progress of the user reading the article as they scroll down, it’s hard to not think about JavaScript. But, it turns out, you can build a reading progress bar using pure CSS as well.
November 3, 2023 — If you’re using GitHub Copilot, there’s good news for you. GitHub Copilot now generates AI commit messages for you based on the changes you’ve made in your codebase.
November 1, 2023 — Laravel’s HTTP client is a wrapper around PHP’s Guzzle HTTP Client library. It provides a fluent interface to communicate with HTTP endpoints. It can be used to make HTTP requests to external APIs or to communicate with your own application.
October 31, 2023 — CSS is a constantly evolving language. It’s getting better and better with each iteration. That’s why it’s important to keep up with the latest CSS features so you can use them in your projects and be less reliant on third-party libraries.
October 30, 2023 — Recently, in one of my Next.js projects LinkSnatch, I needed to use API keys from jsonlink.io. Now, I didn’t want to hardcode the API key in the codebase since it’s an open-source project. So, the best way to handle this is to use environment variables.
October 27, 2023 — Wouldn’t it be nice if you could run PHP in the browser and that too without installing anything on your machine? Well, a technology called WebAssembly lets you do just that.