The new Sleep helper in Laravel 10.x
May 15, 2023 — If you’ve been using PHP for a while, you might have used its sleep function at some point to pause the execution of the script for a given number of seconds.
A blog on PHP, JavaScript, and more
May 15, 2023 — If you’ve been using PHP for a while, you might have used its sleep function at some point to pause the execution of the script for a given number of seconds.
May 9, 2023 — I just returned from an epic 11-day family trip to Kashmir and it had been a soul-satisfying experience to be there. It was everything I needed to reset my energy levels and I couldn’t have asked for anything more.
May 8, 2023 — There comes a time when you would want to expose your local server to the internet but you might not want to deploy your local server to a remote server because it’s not ready yet or you might not want to deploy it at all.
April 24, 2023 — Running system processes in Laravel is a common thing that we all need at some point. For instance, you might want to run a composer install
command or an npm install
command.
April 20, 2023 — Here’s a trippy animated space background that you can create using plain and old CSS. This is inspired by the Beyond the Gradient website.
April 18, 2023 — How many times does it happen to you where you have spun up a node server or a PHP server in your terminal and then you want to put it in the background so that you can do something else?
April 17, 2023 — There comes a time when you want to make some changes to an existing table. For instance, you want to change the data type of a column. So, in this case, you can modify the migration file of the table and then run the migration again using the artisan migrate:refresh
command like so.
April 14, 2023 — I have seen this ping animation on various websites where a circle expands and then contracts to its original size. It’s a pretty neat animation that represents a ping or a notification.
April 12, 2023 — Here’s a handy trick I recently discovered in VS Code that allows you to create non-existent files using the editor itself.
April 10, 2023 — Say you want to find out the number of orders placed in the last 6 months. You can do this in MySQL using the DATE_SUB()
function as follows.