Get "PHP 8 in a Nutshell" (Soon PHP 8.5)
Amit Merchant
Amit Merchant Verified ($30/year for the domain)

A blog on PHP, JavaScript, and more

  • Articles
  • Snippets
  • Projects
  • Uses
  • Stats
  • About
  • Search
Laravel PHP JavaScript Git React

Implementing scroll snap using only three lines of CSS

March 25, 2022 — If you’re not under the rock and using the internet for quite some time, you most probably have stumbled upon one of these websites where when you scroll through the website, portions of it snap to the viewport automatically.

Read More CSS

Clear all kinds of caches with a single command in Laravel

March 23, 2022 — There are mainly three kinds of caches in Laravel that you need to clear all the related junk files and optimize the performance of the application.

Read More Laravel

Console Logging the Right Way

March 22, 2022 — Haters gonna hate and call you uncultured but when it comes to debugging, doing console.log() is one of best the best ways of all time. Period. Well! sort of!

Read More JavaScript

Check if an array of objects contains a certain key-value in JavaScript

March 21, 2022 — The other day, I was stumbled upon a scenario where I need to check whether there exists at least one key of a certain value in an array of objects.

Read More JavaScript

Refactoring conditionals to callables in PHP

March 16, 2022 — Recently, I came across a very handy tip by Nuno Maduro where you can refactor some of the conditionals in your code to callables to make your code more elegant and readable.

Read More PHP

Using value of state variables right after updating in React.js

March 10, 2022 — Working on one of the apps which built on top of React.js, I stumbled upon a scenario where I needed to use the value of a state variable immediately after it’s updated.

Read More React

Auto dark mode origin trial of Chrome

March 8, 2022 — With every new release, the Chrome team would release new features, improve the existing ones, and fix bugs. But on top of this, the team also ships some of the experimental features, sometimes called origin trials, that developers can try out and give feedback.

Read More ChromeDevTools

Curried event handlers in React.js

March 7, 2022 — When working with React.js components, you might end up in a situation where you would be using an event handler more than once.

Read More React

The new whereNot method in Laravel 9.x

March 4, 2022 — Sometimes, the things you would think are quite obvious and should exist without a doubt don’t exist at all.

Read More Laravel

Safely convert any value to boolean in PHP

February 28, 2022 — Converting some values to boolean is a common task while building applications. Now, these values can be anything.

Read More PHP
Previous 1 ... 36 37 38 ... 77 Next

Download my eBook

NOW AVAILABLE PHP 8.4

Newsletter

Subscribe

Follow me everywhere

My Tiny YouTube Channel ➔ YouTube Icon

Recently Published

  • The new progress() function in CSS NEW

  • Seven Real-World Examples of Using the Pipe Operator in PHP 8.5

  • Using the new session cache in Laravel

  • A free and open-source alternative to Spatie's Ray to debug PHP applications

  • Resize any DOM element using two lines of CSS

Top Categories

Laravel PHP Miscellaneous JavaScript CSS VS Code Git React Tools ➔
Home About Contact Categories Links Guestbook
Previous page Next page
Amit Merchant
About Contact Archive Tips Guestbook
One of my favorite flowers from Himalayas—Rhododendron
Copyright © 2025 — Amit Merchant