Blog

Insights, tutorials, and thoughts on web development and technology.

Laravel - Change String Date Format using Accessors

Laravel - Change String Date Format using Accessors

In Laravel if you are storing date in the mysql database and on the frontend you want to change the display format, you can do so easily via Model accessors and mutators. Accessors, mutators, and...

Jul 15, 2022 · Tushar
Force Eager Loading to Prevent N+1 Issues in Laravel

Force Eager Loading to Prevent N+1 Issues in Laravel

Introduction When working with eloquent to fetch models-related data from the database, and then doing any type of processing on the model’s relations, it’s important that we use eager loading. Eager...

Jul 02, 2022 · Tushar
Using Fake Helper in Laravel

Using Fake Helper in Laravel

Laravel version 9.18 has introduced a fake helper, which can be used to generate fake data in your application. This can be used while UI prototyping or generating test data for testing and generating...

Jun 29, 2022 · Tushar
Center Tailwind Container and add Padding

Center Tailwind Container and add Padding

By default Tailwind’s container does not center itself automatically and does not have any built-in horizontal padding. Centering the Container To center the container add the mx-auto utility &lt...

Jun 23, 2022 · Tushar
Add prefix to the tailwind utility classes

Add prefix to the tailwind utility classes

When you are using TailwindCSS in some cases you might want to add a prefix to your tailwind utility classes so that it doesn't mess up with your other library. I often do this when I am using both b...

Jun 23, 2022 · Tushar
Install TailwindCSS on a HTML Project

Install TailwindCSS on a HTML Project

In this article let's go over how we can install TailwindCSS on an HTML project. The simplest and fastest way to get up and running with Tailwind CSS from scratch is with the Tailwind CLI tool. 1. In...

Jun 19, 2022 · Tushar