Posts by Author : tgugnani

When you're working with database in your Laravel project, and you have a table that is already migrated. Now, if you are looking to add a new column to the database table you cannot just simple edit...
Read Article
Here is how you add a foreign key to the migration file of Laravel Let's say you are creating a migration file for comments table, and it a Post model has hasMany relation with the Comment model....
Read Article
If you have an existing table in the database and you are working with the Laravel Migration system. Here is how you can add a new migration to add timestamps field i.e. created_at and updated_at fiel...
Read Article
I switched to Fathom Analytics from Google Analytics last month. In this post, I am going to review the traffic received in the months of October 2022 on this blog. Traffic Analysis The blog rec...
Read Article

PHP

Oct 17, 2022

tgugnani

To format a Carbon date to string output, you can use the format function and pass the following parameter $carbonDate->format('l jS \\of F Y h:i:s A'); //Output -> Thursday 25th of Decembe...
Read Article
I finally moved a step away from WordPress and now I am using Laravel as the backend for this blog. The blog also got a new frontend design, which is based on Tailwind CSS. Why the move ? I got intr...
Read Article
If you have used CSS frameworks, you must have used the container class, TailwindCSS does also have a container utility class but it certainly differs a bit from other frameworks. In this article,...
Read Article
In TailwindCSS you can make use of flexbox to align items right in the middle of the screen by using the following properties flex : changes the div to a flex box container. justify-center : Align...
Read Article
TailwindCSS is a popular utility-first CSS framework, which makes it easier to design your websites. In this article, I will cover how we can create custom utility classes to provide animations to the...
Read Article
I always dreaded learning about Mocking in testing assuming it would be something too complex, and I never really had the requirement of using Mocking in my Laravel tests. But now since I have a ba...
Read Article