Attribute casting in Laravel Eloquent

Laravel’s Eloquent is without a doubt a great ORM exists right now. It has some of the features which makes it ahead of its competitions. One such feature the ORM provides is called “Attribute casting”.

Read More

Implement Invite-only registrations using Laravel's signed URLs

There comes a time when you want URLs which are public but still you want some kind of authentication onto the same. For instance, you’d want such kind of URLs to enable invite-only registrations for your applications, where you’d send a URL to the user which that specific person only can access and register. In such scenarios, signed URLs can come in handy which are the special kind of URLs that have a “signature” hash appended to the query string to verify that the URL has not been modified since it was created.

Read More

Happy 30th dear web!

I fell in love with you the moment I discovered you. I still remember, you and I were still in our teens at that time. Whenever I searched you, you served me unconditionally. And even though we weren’t matured enough, our love still grown.. gradually. Call it “Love at first site” or “Love over time”, it will remain between us for an eternity..

Read More

Packages to make your Laravel development experience awesome.

While developing applications(not necessarily with Laravel), you come across the situation where you need to implement certain functionality. In such cases you shouldn’t want to reinvent the wheel if the functionality is been implemented by someone as a package, accepted well by the community and is ready to be consumed. It’s a no-brainer. I use to follow the same approach and today in this article, I’m going to list out some of my favorite Laravel packages which have made my experience with development in Laravel delicious.

Read More

Best VS Code themes - January 2019

Editor themes are like wallpapers. You get bored of the current one and want to try out something new every now and then. You’ll think you’d settle down to one but that won’t happen (at least in my case).

Read More

This is why PHP don't have multiple inheritance

PHP has evolved greatly as a language over years. From a simple functional scripting language which initially started by Rasmus Lerdorf as his hobby project to supporting object oriented programming features PHP has come a long way. Although, PHP has been implementing and improving features of object oriented programming in its every release, there is this one feature which is missing and I’ve always wondered why it is not there in PHP all these years. Yes, I’m talking about multiple inheritance.

Read More

Why you should use Laravel Queues

There comes times when you wouldn’t want your end users staring at white screens or that intimidating loaders for a long time. For instance when user registers to your site, you must have configured your website to send a welcome email or a confirmation email upon registering. So, that operation should be snappy and for that purpose you’d actually want to reduce the amount of time your app takes while sending the email to the user. Laravel Queues comes to the recue for achieving such kind of time consuming tasks.

Read More

5 must have things for your Jekyll powered blog

Let’s talk about Jekyll today. Jekyll is a blog aware, static website generator which is perfect for personal, project and organization sites. I’ve been using Jekyll for this blog for quite sometime now. Three years to be exact. And the best thing about Jekyll is that you can host it on GitHub Pages for free without compromising the speed or any other factors likewise.

Read More

Top fetaures of PHP 7.3

PHP development team has just released PHP 7.3 with general availability. This release brings general improvements along with some new features. Even though this is a stable release, the team hasn’t provided concrete migration guide if you want to migrate from the older PHP versions. Maybe they will release those on a later date.

Read More

My current setup (2018 edition)

Today’s the day when I’m finally going to write about the current setup of things that I used to get my work done. This will include what software, hardware, accessories I’m using on daily basis at home/work.

Read More

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:

Read More

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.

Read More

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.

Read More

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.

Read More

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.

Read More

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.

Read More

Laravel - Accessors & Mutators

Accessors and mutators allow you to format Eloquent attribute values when you retrieve or set them on model instances. I’ll explain how you can you use them into your app.

Read More

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:

Read More

Building a simple offline-capable Notepad app using ServiceWorker

Today, We are going to build a progressive Notepad app which can very well be used in offline mode, be responsive on all available devices and which saves the content locally on device. So, the core functionality of this Notepad here is to make it work offline. To fulfill this requirement, we’ll use ServiceWorkers which I’m going to cover next.

Read More

Getting started with Electron

Have you ever wanted to develop desktop apps while being a true web developer without even caring about the native architecture or the language most of the applications build for different platforms likes of Windows, macOS or Linux? Or you just wanted to get started with building desktop apps? Isn’t it great if you are able to build desktop apps using the technologies you already knows i.e. HTML, JavaScript and CSS? I was in the same urge to dive into world of desktop apps. So, I have been stuck on to GitHub’s Electron lately.

Read More

Hello world!

Hey guys, this is my first post after setting up my blog with Jekyll. I will update my blog more than often from now onwards.

Read More