Temporal intervals are handy in MySQL
April 10, 2023 — Say you want to find out the number of orders placed in the last 6 months. You can do this in MySQL using the DATE_SUB()
function as follows.
A blog on PHP, JavaScript, and more
April 10, 2023 — Say you want to find out the number of orders placed in the last 6 months. You can do this in MySQL using the DATE_SUB()
function as follows.
April 7, 2023 — I don’t talk about this much but decided to let it out today. So, I have been suffering from pretty bad anxiety attacks for the past 10 months or so.
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.
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.
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.
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.
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.
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.
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.
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.