Amit Merchant

Amit Merchant Verified ($10/year for the domain)

A blog on PHP, JavaScript, and more

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

Prevent object extension — Object.freeze() vs Object.seal() vs Object.preventExtensions()

September 20, 2021 — When it comes to prevention of modification/updation of an object in JavaScript, there are few things that you can do.

Read More ⋆ JavaScript

Abort a fetch request manually in JavaScript

September 17, 2021 — The Fetch API, as you might know, is a modern replacement of the good old XHRHttpRequest (popularly known as Ajax) that gives nicer developer experience (DX) by giving a promise based implementation.

Read More ⋆ JavaScript

How to get class instance without a constructor in PHP

September 13, 2021 — Have you ever stumbled upon a situation in which you need an instance of a class to create its object but with one condition and that is there is no constructor declared for that class?

Read More ⋆ PHP

Graceful error handling using Error Boundaries in React.js

September 12, 2021 — Working with React.js, it’s a common thing you would see where if something goes wrong, (for instance, a JavaScript error), the entire React.js app would crash instantly and renders blank.

Read More ⋆ React

Initialize objects right into the constructor parameters in PHP 8.1

September 11, 2021 — With the introduction of PHP 8, the language now allows us to declare the class properties right into the constructor parameters. This is called constructor property promotion.

Read More ⋆ PHP

A cool helper function to check if anything is blank in PHP

September 9, 2021 — There are a lot of different ways in PHP using which you can validate if the given value is “blank” or not. The method to validate depends upon the type of value that we’re targetting.

Read More ⋆ PHP

The whereRelation (A better version of whereHas) method in Laravel 8.x

September 5, 2021 — Checking the existence of relationships and fetching model records is quite easy in Laravel.

Read More ⋆ Laravel

Designing websites keeping floating tab bar of Safari 15 (on iOS) in mind

September 2, 2021 — The newest version of Safari, i.e Safari 15, on iOS is great. It comes with an all-new layout and a new way of navigating websites on it.

Read More ⋆ Miscellaneous

Position children elements in the parent absolutely using CSS

August 29, 2021 — Sometimes, it might be the case where you want to place/position the children elements that reside insides their parent absolutely.

Read More ⋆ CSS

RegEx simplified with named capture groups in JavaScript

August 24, 2021 — Regular expressions (RegEx) are great little strings that help in solving some of the complex problems that are rather hard if we don’t use the RegExes.

Read More ⋆ JavaScript
Previous 1 ... 20 21 22 ... 54 Next

Download my eBook

PHP 8 in a Nutshell

(Includes PHP 8.1 and 8.2)

Newsletter

Subscribe

Follow me everywhere

My Tiny YouTube Channel ⟶ YouTube Icon

Recently Published

  • A Laravel macro for outputting possessive apostrophes correctly NEW

  • A tool to generate YouTube chapters in seconds

  • A handy File method to read JSON files in Laravel 10.x

  • A practical use case of anonymous classes in PHP

  • How to stop a React component from rendering

Top Categories

Laravel PHP JavaScript Miscellaneous CSS React Git VS Code Jekyll ➔
Home About Contact Categories Guestbook
Previous page Next page
Amit Merchant
About Contact Categories Guestbook
Copyright © 2023 — Amit Merchant