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

Using PER Coding Style with Laravel Pint

April 6, 2023 — When it comes to using a clean and consistent coding style across your Laravel project, the best way to do this is by using the Laravel Pint package. It’s a package that allows you to use the standard PSR coding style in your Laravel project.

Read More Laravel

Code explanation using GitHub Copilot

April 4, 2023 — Sometimes, you come across a piece of code and you’re not sure what it does. You may spend a lot of time trying to understand it but you may not be able to grasp it completely. In such cases, you can use GitHub Copilot to get a code explanation.

Read More Copilot

Using existing HasMany relationships as HasOne in Laravel

March 31, 2023 — A HasMany relationship in Laravel helps you to define a one-to-many relationship between two models. So, if you have a User model and a Post model, you can define a HasMany relationship between them like so.

Read More Laravel

Checkered background using two lines of code in CSS

March 30, 2023 — I have a long list of personal blogs that I have been maintaining in my RSS reader. And one of the blogs in this list is Rach Smith’s digital garden.

Read More CSS

An int(11) is not what you think it is in MySQL

March 28, 2023 — Here’s the biggest myth I had about MySQL’s int data type that just got busted while watching one of the videos from the course MySQL for Developers. Essentially, I have been doing it wrong all this time.

Read More MySQL

A Laravel macro for outputting possessive apostrophes correctly

March 26, 2023 — Macros in Laravel are gifts that keep on giving. They let you extend the functionality of Laravel in a way that you can use them anywhere in your application.

Read More Laravel

A tool to generate YouTube chapters in seconds

March 22, 2023 — If you’re a guy who enthusiastically creates YouTube videos but hates it when you have to manually enter the chapter timestamps in the YouTube editor, then this free tool by my friend Chris will definitely going to save your day.

Read More Miscellaneous

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

March 22, 2023 — We now have a nice addition to the File facade in Laravel 10.x that lets you read JSON files easily. Essentially, it’s a wrapper around the json_decode() function. So, you can use it to read JSON files like so.

Read More Laravel

A practical use case of anonymous classes in PHP

March 20, 2023 — Anonymous classes in PHP let you create a class on the fly without having to define a new class. They are especially useful when you want to create a class that is only used once.

Read More PHP

How to stop a React component from rendering

March 18, 2023 — In React, when you want don’t want a component to render based on some condition, you might reach for short-circuiting to achieve the same.

Read More React
Previous 1 ... 22 23 24 ... 77 Next

Download my eBook

NOW AVAILABLE PHP 8.4

Newsletter

Subscribe

Follow me everywhere

My Tiny YouTube Channel ➔ YouTube Icon

Recently Published

  • Resize any DOM element using two lines of CSS NEW

  • Chrome now has an AI Summarizer API built right in

  • Automate PDF Generation from Custom Designs using Orshot

  • Everything that is coming in PHP 8.5

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

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