Get "PHP 8 in a Nuthshell" (Now with PHP 8.4)
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

How to create a two column layout using Flexbox in CSS

August 9, 2020 — This blog has got this two-column layout which houses host of different things for different purposes. A two-column layout is especially useful if you want to repeat a certain column on every page.

Read More CSS

Set default value for attributes in components using @props directive in Laravel

August 8, 2020 — As I described in this article on how you can create anonymous components in Laravel, we can create an <x-alert> component with the following content.

Read More Laravel

TypeScript's private modifiers Vs. ECMAScript's hash(#) private fields

August 6, 2020 — With the release of TypeScript 3.8, the team has introduced support for the ECMAScript Private Fields into the TypeScript itself. Meaning, you can now declare private fields in the class using # like so.

Read More Typescript

Check for the application environment in Laravel views

August 5, 2020 — Often you’d come across a scenario where you’d like to check the application environment and based on that you’d like to render things.

Read More Laravel

How to check if the API call is failing using Fetch in JavaScript

August 4, 2020 — The Fetch API as we all know is the modern replacement to the good old XHRHttpRequest AKA Ajax as it’s much simpler and uses promises. It’s great to make API calls without adding any third-party library overhead.

Read More JavaScript

Creating your own custom conditional directives in Laravel Blade

July 31, 2020 — Laravel’s Blade template engine is great and ever-evolving. There are some features in Blade, which if used appropriately, can make your codebase look more organized and recognizable.

Read More Laravel

Things to consider before using arrow functions in JavaScript

July 29, 2020 — Although the Arrow functions in JavaScript are a great way to make your code concise and more readable than the regular functions, there are some important things that you should consider before using arrow functions which can even break your application if you’re not aware of this.

Read More JavaScript

Remove event listener once it's invoked in JavaScript

July 28, 2020 — The usual way of adding event-listener on certain elements is using the addEventListener method on the element. For instance, if you want to register a click event on an element with id checkoutBtn, you can do it like so.

Read More JavaScript

Freeze scroll on arrow key up or down using JavaScript

July 27, 2020 — I was working on implementing the Konami code easter egg on this blog and there was this need where I need to stop the scrolling only when the previous two presses by the user are ArrowUp.

Read More JavaScript

How I implemented a Konami easter egg on my blog

July 24, 2020 — So, the other day, I was going through my Twitter feed and I saw this tweet. This user had explored an easter egg on the newly designed Stripe.com’s website.

Read More JavaScript
Previous 1 ... 57 58 59 ... 76 Next

Download my eBook

NOW AVAILABLE PHP 8.4

Newsletter

Subscribe

Follow me everywhere

My Tiny YouTube Channel ➔ YouTube Icon

Recently Published

  • The absolute fastest way to install PHP on your system in 2025 NEW

  • Two new array methods are coming in PHP 8.5 — array_first() and array_last()

  • Memoizing the cache in Laravel

  • Preventing N+1 issues globally in Laravel using Auto Eager Loading

  • The missing owns() method in Laravel's Eloquent

Top Categories

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