Amit Merchant

Amit Merchant

A blog on PHP, JavaScript, and more

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

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

Using JavaScript-style Promises in PHP

July 23, 2020 — If you’re familiar with JavaScript, you might have worked with or at least heard about Promises at some point of time.

Read More ⟶ ⋆ PHP

Check if the specific service provider is loaded or not in Laravel

July 20, 2020 — Sometimes, you want to load some stuff based on the fact that the certain service provider is loaded in the providers array of config/app.php or not.

Read More ⟶ ⋆ Laravel

Push to newly created branch without creating an upstream branch in Git

July 19, 2020 — Git is a lot easier when you make the best out of it. For instance, setting a simple Git config can make your life a lot simpler and smoother.

Read More ⟶ ⋆ Git

Using Chrome DevTools as a secret code editor

July 14, 2020 — That’s right! You can even use Chrome DevTools as your “Adhoc” code editor. Now, why would you do that, you ask? Well, there are a few reasons.

Read More ⟶ ⋆ ChromeDevTools

Make function parameters required in vanilla JavaScript

July 14, 2020 — You might be aware of how to set default values for function parameters in JavaScript. For instance, if you want to set the default value for a parameter, you can do it like so.

Read More ⟶ ⋆ JavaScript
« Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 Next »

Download my eBook

PHP 8 in a Nutshell

Newsletter

By subscribing, you agree with Revue’s Terms of Service and Privacy Policy.

Follow me everywhere

My Tiny YouTube Channel ⟶ YouTube Icon

Recently Published

  • Making headers sticky using CSS for a better reading experience NEW

  • Array to object conversion in JavaScript

  • Conditionally loading CSS or any resource using media queries

  • Reduce array of objects to an object in JavaScript

  • Unpack arrays conditionally in PHP

Top Categories

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