October 11, 2022 — Here’s a little tip that I learned recently. It’s about destructuring an object and aliasing the destructured variables. I’ll show you how it works with an example.
October 9, 2022 — Today, if we want to validate a JSON string in PHP, we can use the
json_decode() function. Here’s how it works.
October 4, 2022 — If you’re a developer, you must be familiar with the concept of version control. It’s a system that records changes to a file or set of files over time so that you can recall specific versions later.
September 30, 2022 — The use of environment files in Laravel (or any other similar framework) is pretty common. You can use the
.env file to store the environment variables. This is a great way to store sensitive information like API keys, database credentials, etc. in a secure way.
...) can be used to spread the properties of an object.
September 18, 2022 — Recently, I stumbled upon a problem where I had to toggle the state of the checkbox based on the viewport width. So, let’s say, if the viewport width is changed and is less than
879px and the checkbox is checked, then it should be unchecked.
September 16, 2022 — In the recent Laravel 9.x release, the framework introduced a new
discardChanges() method on the
Model class. This method allows you to discard the changes made to the model instance. So, let’s see how we can use this method.
...) to do so.
September 10, 2022 — Converting images from one format to another programmatically is sort of a common task. For example, you may want to convert all your PNG images to WebP format to save bandwidth and improve the performance of your application.
Download my eBook
Follow me everywhere