Amit Merchant

Amit Merchant

A blog on PHP, JavaScript, and more

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

Insert mass database records using model factories in Laravel

August 17, 2020 — One of the many ways using which you can insert records (or seed your database) is by using the seeder classes which extend a base class called Illuminate\Database\Seeder in Laravel.

Read More ⟶ ⋆ Laravel

Making my VS Code minimal and distraction-free

August 14, 2020 — Before proceeding on describing all the customizations I made, I have a confession to make.

Read More ⟶ ⋆ VS Code

Live reload local Jekyll site in browser on file changes

August 13, 2020 — The other day, I was looking for a way using which I can reload my local Jekyll instance every time I make some changes into the files.

Read More ⟶ ⋆ Jekyll

Expose your local websites to the internet using this open source tool in PHP

August 12, 2020 — Recently, I’ve been working on a Laravel app and one of my friends wanted to see it in action who’s sitting seven ocean apart. But, I didn’t have an actual server to host it and to make it accessible for my friend. And so, I was looking for a tool/API which can expose my local website instance to the internet.

Read More ⟶ ⋆ PHP

Accessing private methods and properties outside of class using reflection in PHP

August 11, 2020 — In PHP, the visibility of a property, a method, or a constant can be defined by prefixing the declaration using keywords public, protected or private. Here is how these modifiers work.

Read More ⟶ ⋆ PHP

How to group where constraints in Laravel Eloquent

August 10, 2020 — When writing MySQL queries, if there are more than two where conditions, you’d want to group certain constraints/conditions to avoid unexpected behavior. For instance, check the following query.

Read More ⟶ ⋆ Laravel

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
« 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 44 45 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

  • Do cleanup from useEffect in React.js whenever possible NEW

  • Plural strings based on the count in Laravel

  • Detecting slow database operations in Laravel 9.x

  • Keeping track of the last value of state in React.js

  • How to validate JSON in Laravel

Top Categories

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