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 get system timezone for macOS and Linux in PHP

March 17, 2021 — Oftentimes you would want to retrieve the user’s timezone to perform a certain task. And how would you retrieve it? One way to do it in PHP is by retrieving the timezone set on the user’s system.

Read More PHP

Seeding model rows based on the user input in Laravel

March 15, 2021 — Oftentimes, it would be handy if you could seed the number of model rows based on the user input. i.e you don’t hardcode the number of rows a seeder would generate. The user will pass that number while running the seeder.

Read More Laravel

How to use HTML with CSS inside SVG

March 14, 2021 — Have you ever run into a situation where you want to render some HTML into an SVG? Well, if you ask me the same question, I would say yes.

Read More HTML

Dry running Laravel migrations before actually migrating them

March 11, 2021 — Sometimes, you might run into a situation where you want to see what all database queries will run upon running your Laravel migrations, and that too without actually running the migrations.

Read More Laravel

Fibers or Coroutines for asynchronous programming in PHP 8.1

March 9, 2021 — There has been a scarcity of discussion in PHP land when it comes to asynchronous PHP. Maybe, PHP developers don’t seem to be interested in the very idea of it.

Read More PHP

Update state of component from other components using React hooks

March 6, 2021 — React Hooks are a great way to add stateful logic into function components. So, if you want to maintain a state in the component you can do it using useState hook like so.

Read More React

Remove or omit object properties without mutation in JavaScript

March 1, 2021 — Since immutability in JavaScript is important for predictability and performance of your application, we often find ourselves in situations where we need to achieve some of the operations without mutating the original object/array.

Read More JavaScript

Retrieve HTTP response as a collection in Laravel 8.x

February 27, 2021 — Sometimes, when working with HTTP responses, you might want to retrieve the entire response as a Laravel collection to make further manipulations.

Read More Laravel

Adding lines conditionally in Laravel's Mail notifications

February 23, 2021 — When working with Mail notifications in Laravel, you’ll often be in a situation where you would want to render something based on some condition.

Read More Laravel

Mutation-free JSON column updation using AsArrayObject Eloquent cast

February 21, 2021 — If you have worked with a Large scale Laravel application, there might be a great chance that you would have to use JSON columns to save some information in your tables.

Read More Laravel
Previous 1 ... 48 49 50 ... 76 Next

Download my eBook

NOW AVAILABLE PHP 8.4

Newsletter

Subscribe

Follow me everywhere

My Tiny YouTube Channel ➔ YouTube Icon

Recently Published

  • Stop Ignoring Important Returns with PHP 8.5’s `#[\NoDiscard]` Attribute NEW

  • Innovative Solutions for eCommerce — How Shopify Headless Works

  • The best paid SVG icon resources that money can buy

  • The new if() function in CSS has landed in the latest Chrome

  • The pipe operator is coming to PHP 8.5

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 Archive Tips Guestbook
One of my favorite flowers from Himalayas—Rhododendron
Copyright © 2025 — Amit Merchant