Array destructuring in PHP

— Folks who are familiar with the JavaScript’s ES6 may very well aware of the destructuring feature which allows us to extract data from arrays, objects, maps and sets. For instance, Using ES6 way, we can assign the top level variables of the objects to local variables using destructuring like below:

The ideal Git workflow

— Today, I’m going to discuss about Git workflow that we’re using at our projects which involves a team of several developers. Git is no doubt a great version control system but if you don’t use it efficiently, things can get messy easily. For instance, if there are 10 people working on the same codebase and each of them work on the same branch, it would be really difficult to keep the branch’s state clean. So, here’s a workflow which we follow in all our projects. The workflow is could work great for big teams but small teams can also get benefited from it equally.

Store it like git stash

— If you have ever worked with Git, you probably have encountered the following situation. i.e. You’ve two branches, let’s say feature-1 and feature-2, for two different features respectively. You have worked on the the first branch feature-1, completed all the related tasks and committed and pushed all the outstanding changes on that branch. So, the feature-1 branch is now clean.

My favorite VS Code themes for September 2018

VS Code is no doubt the favorite code editor of developers these days. Colour themes let you modify the colours in Visual Studio Code’s user interface to suit your preferences and work environment. Today, I’m going to show you my favorite themes which I’ve tried out so far and compiled down the best among them.

Using private repositories as a composer package in PHP

Composer is the goto method of adding dependencies in modern PHP application. You search for a library for a concerned functionality and you’ll probably find the one in the large database of the Pacakgist. But there comes a time where you’d want to use a library which is private and should be only available to you. Well, the good news is, you can achieve this using this trick.

TIL - How to fix embedded scripts in Progressive Web Apps

Progressive Web Apps are great when you need to achieve things like offline capabilities, push notifications, background-sync and to give your website an overall app-like experience. While, the PWAs are great at implementing all of the above things and are the obvious choice, there are certain things which can be broken when you use ServiceWorker(which are the building blocks of any PWA) to make your webaite a PWA.

Laravel Eager Loading - load() Vs. with()

— Today, while working with one of my projects(which is built on top Laravel) I bumped into the situation where I needed to get associated model’s data for one of the models. So here, I had two approaches in Laravel to accomplish this which are basically called Eager Loading: