September 3, 2020
September 2, 2020
Lately, I wanted to show related posts on post pages based on the category the current post lies in. So, for instance, of the post belongs to the “Jekyll” category, I would fetch the recent five posts published under this category and show those on the post. In my case, as you can tell, I’ve shown it in the right sidebar under
More in "Jekyll" label.
September 1, 2020
In one of my articles, I’ve described how you can add different behavior to some of the classes in Laravel using macros. To give you a primer, Laravel ships with this trait called Illuminate\Support\Traits\Macroable using which you can add additional methods to the class in hand (which is using the
Macroable trait) at run time.
August 31, 2020
Often, there comes a scenario when you want to type annotate (or type hint) some of the variables or arguments for a subset of a given type.
August 28, 2020
When it comes to exporting modules, there are two primary ways in TypeScript using which you can do this.
August 27, 2020
When I first started blogging using Jekyll, I was using a popular Jekyll theme called jekyll-now. The theme is quite minimalistic in nature, bare-bone and lacking some key features. But in those earlier days, I was okay with its simplicity.
August 26, 2020
You know it’s always a good idea to have something at your disposal using which you can improve the performance of your applications. When it comes to web applications, one of the many things that power them is database queries and that’s why it’s no surprise that you may want to optimize those and make your application a little faster!
August 24, 2020
You might be aware of the typical way of defining model relationships in Laravel Eloquent. i.e inside of the models itself.
August 22, 2020
Recently, I needed to change some design elements of a site when the site is in the fullscreen mode. So, I was looking for a way to it using CSS as all I wanted to change was hiding some stuff when in the fullscreen mode.
August 20, 2020
There comes a time when you want to fetch the number of records for a child relationship along with the main Eloquent query.