Get "PHP 8 in a Nuthshell" (Now comes with PHP 8.3)
Amit Merchant

Amit Merchant Verified ($10/year for the domain)

A blog on PHP, JavaScript, and more

  • Articles
  • Snippets
  • Projects
  • Uses
  • Stats
  • About
  • Search
Laravel PHP JavaScript Git React

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

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
Previous 1 ... 46 47 48 ... 65 Next

Awesome Sponsors

Uploadcare
Become a Sponsor
And get featured on this spot

Download my eBook

PHP 8 in a Nutshell

(Includes PHP 8.1, 8.2, and 8.3)

Newsletter

Subscribe

Follow me everywhere

My Tiny YouTube Channel ➔ YouTube Icon

Recently Published

  • Auto-generate maintenance mode secret in Laravel NEW

  • Rendering a website inside GitHub Readme

  • Real-time Application Performance Monitoring with Laravel Pulse

  • Tools I use to create images of my code

  • Using any large JSON as a lazy collection in Laravel

Top Categories

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