Mitul Golakiya

Mitul Golakiya's Posts

CEO & Founder

Custom path generation in Spatie Media Library while multi-tenant

Recently we use Spatie laravel-multitenancy package in our of our client's CRM project along with spatie/laravel-medialibrary.

The default behavior of the media library package is, it generates a folder for each media with its ID in our configured disk, like a public folder or s3 or whatever disk we configured.

This works really great when you are dealing with a single-tenant application. But while using multi-tenant, you got a media table in each of your tenant databases. so this pattern simply doesn't work. Because then you will end up having multiple media files under the same folder from different tenants.

So what we want to do is, instead of having a structure like,

public -- media 
---- 1 
------ file.jpg 
---- 2 
------ file.jpg 
...

What we want to achieve is, we want to have a folder structure where media of every tenant will be in a separate folder with tenant unique id,

public -- media 
---- abcd1234 
// tenant1 Id 
------ 1 
-------- file.jpg 
------ 2 
-------- file.jpg 
---- efgh5678 
// tenant2 Id 
------ 1 
-------- file.jpg 
------ 2 
-------- file.jpg 
...

Spatie Media library is very configurable out of the box where you can write your own media library path generator. That is documented very well over here

So what we did is, we wrote our own Path Generator, which can store files into tenants folder. Here is how it looks like,

<?php
namespace App\MediaLibrary;

use Spatie\MediaLibrary\MediaCollections\Models\Media;
use Spatie\MediaLibrary\Support\PathGenerator\DefaultPathGenerator;

class InfyCRMMediaPathGenerator extends DefaultPathGenerator
{
    /*
      Get a unique base path for the given media.
     /
    protected function getBasePath(Media $media): string
    {
        $currentTenant = app('currentTenant');
        return $currentTenant->unique_id.DIRECTORY_SEPARATOR.$media->getKey();
    }
}

What we did here is, we just simply extended the Spatie\MediaLibrary\Support\PathGenerator\DefaultPathGenerator of Media Library and override the function getBasePath. We attached the prefix of the tenant's unique_id to the path. so instead of 1/file.png, it will return abcd1234/1/file.png.

All you need to make sure is, whenever you are uploading a media, your application should be tenant aware. Otherwise, it will not able to get the current tenant.

Hope this helps while using spatie media library along with spatie multi-tenant.

Even if you are not using a spatie multi-tenant, still you can create your own PathGenerator and use it your own way to have a media structure you want.

July 30, 20202 minutesMitul GolakiyaMitul Golakiya
Spatie Laravel Multi-Tenancy without Sub Domain (customize TenantFinder)

Recently Spatie released a brand new package for multi-tenancy called laravel-multitenancy.

It comes with great support to work out of the box with sub-domains like,

https://zluck.infychat.com

https://infyom.infychat.com

https://vasundhara.infychat.com

It identifies the tenant based on the sub-domain and sets a database runtime for your tenant-specific models.

Recently, we used it in one of our clients for Snow Removal CRM. Here we have two models,

  1. Freemium Model - with no sub-domain (application will work on main domain only)
  2. Premium Model - where the tenant will get its subdomain

And a user can convert his account from Freemium to Premium at any point in time by just subscribing to the plan.

So what we want is, on the backend, we want to have a separate database for each tenant, but the application should run on main as well as a sub-domain.

So what we want to have is the ability to extend/customize the tenant detection mechanism. And Spatie does a very good job there where you can customize the logic.

You can create your own TenantFinder class and configure it in the config file of the package. And there is very good documentation for that here:https://docs.spatie.be/laravel-multitenancy/v1/installation/determining-current-tenant/

To do that, what we did is, we have a field called tenant_id in our users table. All of our users are stored in the main database since we may have user access across the tenant.

And when any user does a login, we listen for the event Illuminate\Auth\Events\Login which is documented in Laravel Docs over here.

When a user does a login, our listener will be called and will create a cookie called tenant on the browser with the tenant id of the user. So our listener will look like,

<?php
namespace App\Listeners;

use App\Models\User;
use Cookie;
use Illuminate\Auth\Events\Login;

class LoginListener
{
    public function handle(Login $event)
    {
        /* @var User $authUser /
        $authUser = $event->user;

        Cookie::forget('tenant');
        Cookie::queue(Cookie::forever('tenant', encrypt($authUser->tenant_id)));
    }
}

Also, we encrypt the cookie on our end, so we do not want Laravel to encrypt it again, so we added the tenant cookie into except array of EncryptCookies middleware as per documentation here. so our middleware looks like,

<?php
namespace App\Http\Middleware;

use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;

class EncryptCookies extends Middleware
{
    /**
      The names of the cookies should not be encrypted.

      @var array
     /
    protected $except = [undefined];
}

Now at the last point, we extended our logic to find a tenant and get it to work on the main domain as well as sub-domain.

We have created our own custom class called InfyChatTenantFinder, which looks like,

<?php
namespace App\TenantFinder;

use App\Models\Account;
use App\Models\SubDomain;
use Illuminate\Http\Request;
use Spatie\Multitenancy\Models\Concerns\UsesTenantModel;
use Spatie\Multitenancy\Models\Tenant;
use Spatie\Multitenancy\TenantFinder\TenantFinder;

class InfyChatTenantFinder extends TenantFinder
{
    use UsesTenantModel;

    public function findForRequest(Request $request): ?Tenant
    {
        $host = $request->getHost();
        list($subDomain) = explode('.', $host, 2);

        // Get Tenant by subdomain if it's on subdomain
        if (!in_array($subDomain, ["www", "admin", "infychat"])) {
            return $this->getTenantModel()::whereDomain($host)->first();
        }

        // Get Tenant from user's account id if it's main domain
        if (in_array($subDomain, ["www", "infychat"])) {

            if ($request->hasCookie('tenant')) {
                $accountId = $request->cookie('tenant');
                $accountId = decrypt($accountId);
                $account = $this->getTenantModel()::find($accountId);

                if (!empty($account)) {
                    return $account;
                }
                \Cookie::forget('tenant');
            }
        }
        return null;
    }
}

So basically, first we check if the sub-domain is there, then find a tenant from the sub-domain.

If the domain is the main domain then get the tenant id from the cookie and return the account (tenant) model.

So this is how you can customize the logic the way you want to have a custom tenant identification system.

July 24, 20203 minutesMitul GolakiyaMitul Golakiya
toBase function in Laravel Eloquent

Sometimes we need to load a large amount of data into memory. Like all the models we have in the database.

For e.g. PDF Printing, Perform some global updates, etc.

So the general practices we use in Laravel is to write the following code,

$users = User::all();

Just imagine I have 10,000 users in the database and when I load all the users in one shot.

But it takes a really high amount of memory to load all the records and prepare Laravel Model class objects. And sometimes we also load them in chunks to save the memory, but in some use cases, chunking can not be the option.

Here is the screenshot of mine when I load 10,000 users into memory with the above code.


10k Models


It's using 37MB memory. Also, imagine the required memory if we are loading some relationships as well with these 10,000 records.

The Eloquent model is a great way to handle operations with lots of features like Mutators, Relationships, and much more.

But we really do not use these features all the time. We simply output or use the direct values which are stored in the table. So ideally, we do not need an eloquent model at all, if we are not going to use these features.

In those cases, Laravel also has a handy function toBase(). By calling this function it will retrieve the data from the database but it will not prepare the Eloquent models, but will just give us raw data and help us to save a ton of memory.

So my revised code will look something like this,

$users = User::toBase()->get();

Check the revised memory screenshot after adding the toBase function.


10k Models toBase


So it almost saves 50% of the memory. It's reduced from 35MB to 20MB and the application also works much much faster, because it doesn't need to spend time in preparing 10,000 Eloquent models.

So if you are not really going to use features of Eloquent and loading a large amount of data, then the toBase function can be really useful.

Here you can find a full video tutorial for the same.

June 21, 20202 minutesMitul GolakiyaMitul Golakiya
Make long path shorter in asset function in laravel

Recently, I've started working on one project where we follow modules patterns and for the same, we have different assets folders for the different modules and the folder named common for assets which are common across all the modules.

So our public folder looks like the following,

Module Asset Functions

The problem that I started facing was everywhere I needed to give a full path to import/include any of the files from any of the folders. For e.g.

<img src="{{ asset('assets/tasks/images/delete.png') }}"alt="Delete Task">

Even if we have some folder in images to group similar images then it was even becoming longer. For e.g.

<img src="{{ asset('assets/tasks/images/social/facebook.png') }}" alt="Facebook">

The workaround that I used is, I created one file called helpers.php and created dedicated asset functions for each of the modules. For e.g., for tasks,

if (!function_exists('tasks_asset')) {     
/**      
* Generate an asset path for the tasks module folder.
*      
* @param  string  $path      
* @param  bool|null  $secure      
* @return string      
*/     
function tasks_asset($path, $secure = null){
    $path = "assets/tasks/".$path;         
    return app('url')->asset($path, $secure);     
  } 
}

With this function, I can use,

<img src="{{ tasks_asset('images/delete.png') }}" alt="Delete Task">

Other advantages it gives are,

  1. if in future if the path of tasks folder changed, then I do not need to go and update every single import/include.
  2. I (or any new developer) do not need to remember the long paths and can always use direct function names for modules.

Even I like this pattern so much, so I went further and created dedicated image function as well,

if (!function_exists('tasks_image')) {     
/**      
* Generate an asset path for the tasks module images folder.
*      
* @param  string  $path      
* @param  bool|null  $secure      
* @return string      
*/     
function tasks_image($path, $secure = null){
    $path = "images/".$path;         
    return tasks_asset($path, $secure);     
  } 
}

So I can use it as,

<img src="{{ tasks_image('delete.png') }}" alt="Delete Task">

Simple and handy functions to use everywhere.

May 16, 20202 minutesMitul GolakiyaMitul Golakiya
Avoid Micro-Management & Respect Each and Everyone

In chapter 5 of Gita, Karma-Sanyas-Yog, Lord Shree Krishna said in verse 8,

ркпрлЛркЧркпрлБркХрлНркд ркдркдрлНрк╡ркирлЗ ркЬрк╛ркгркирк╛рк░рлЛ ркоркирлБрк╖рлНркп ркЬрлБркП, рк╕рк╛ркВркнрк│рлЗ, рк╕рлНрккрк░рлНрк╢ ркХрк░рлЗ, рк╕рлВркВркШрлЗ, ркЦрк╛ркп, ркЪрк╛рк▓рлЗ, ркКркВркШрлЗ, рк╢рлНрк╡рк╛рк╕ рк▓рлЗ, ркмрлЛрк▓рлЗ, ркорк│ркдрлНркпрк╛ркЧ ркХрк░рлЗ, ркЧрлНрк░рк╣ркг ркХрк░рлЗ, ркирлЗркдрлНрк░ ркЙркШрк╛ркбрлЗ ркдркерк╛ ркорлАркВркЪрлЗ ркдрлЛ рккркг "ркЗркирлНркжрлНрк░рк┐ркпрлЛркирк╛ рк╡рк┐рк╖ркпрлЛркорк╛ркВ ркЗркирлНркжрлНрк░рк┐ркпрлЛ рк╡рк░рлНркдрлЗ ркЫрлЗ" ркПрко рк╕ркоркЬрлА "рк╣рлБркВ ркХрк╛ркВркИ ркЬ ркХрк░ркдрлЛ ркиркерлА" ркПрко ркоркирлЗ ркЫрлЗ.

The wise person knows, just like breathing, smelling, opening and closing eyelid, eating, sleep happens automatically, just like that He believes that everything is happening by itself. IтАЩm just doing nothing.

Same in business, do not try to micro-manage things. Some things happen by themselves. And let them happen in their own way. If you will spend your time micro-managing those small things then you will never be able to focus on other important things.

The another important thing is,

ркЬрлНркЮрк╛ркирлАркУ рк╡рк┐ркжрлНркпрк╛рк╡рк┐ркиркпркпрлБркХрлНркд ркмрлНрк░рк╛рк╣рлНркоркгркорк╛ркВ, ркЧрк╛ркпркорк╛ркВ, рк╣рк╛ркерлАркорк╛ркВ, ркХрлВркдрк░рк╛ркорк╛ркВ ркдркерк╛ ркЪрк╛ркВркбрк╛рк▓ркорк╛ркВ рккркг рк╕ркорк╛рки ркжрлНрк░рк╖рлНркЯрк┐ рк░рк╛ркЦрк╡рк╛рк╡рк╛рк│рк╛ рк╣рлЛркп ркЫрлЗ.

Sometimes people only respect certain people. Like some people only give respect to rich and financially sound people but they donтАЩt pay attention to middle or lower income group people. Such behavior is not proper. Same way in the office as well, we give attention to some people and we might not give attention to the office boy, pun, watchman, cleaner, etc., or Senior Developer vs Junior Developer. One must consider each and everyone with equality. Each and everyone should be respected. Just say Hi or Hello and see the Joy that you and they get.

You can also listen to the full podcast here.

February 07, 20201 minuteMitul GolakiyaMitul Golakiya
When CEO should come back to the company while being A-Karta

Shreemad Bhagavad Gita has a lot to say about business management. In the last Post of Karma-Yoga, we have seen how our actions should be for the benefits of the others. Today, let's see Chapter 4.

In Chapter 4, Karma-Brahm-Arpan-Yoga (J├▒─Бna Karm Sany─Бs Yog), verse 13th and 14th, Lord Krishna said,

рдЪрд╛рддреБрд░реНрд╡рд░реНрдгреНрдпрдВ рдордпрд╛ рд╕реГрд╖реНрдЯрдВ рдЧреБрдгрдХрд░реНрдорд╡рд┐рднрд╛рдЧрд╢: |

рддрд╕реНрдп рдХрд░реНрддрд╛рд░рдордкрд┐ рдорд╛рдВ рд╡рд┐рджреНрдзреНрдпрдХрд░реНрддрд╛рд░рдорд╡реНрдпрдпрдореН || 13 ||

The four categories of occupations were created by me according to peopleтАЩs qualities and activities. Although I am the creator of this system, know me to be the non-doer and eternal. (source: holy-bhagavad-gita.org)

рккрлНрк░ркХрлГркдрк┐ркирк╛ ркдрлНрк░ркг ркЧрлБркгрлЛ ркПркирлНркб ркХрк░рлНркорлЛркирк╛ рк╡рк┐ркнрк╛ркЧ рккрлНрк░ркорк╛ркгрлЗ ркорлЗркВ ркмрлНрк░рк╛рк╣рлНркоркг, ркХрлНрк╖ркдрлНрк░рк┐ркп, рк╡рлИрк╢рлНркп ркЕркирлЗ рк╢рлБркжрлНрк░ ркПрко ркЪрк╛рк░ рк╡рк░рлНркгрлЛркирлА рк░ркЪркирк╛ ркХрк░рлА ркЫрлЗ. ркдрлЗркирлЛ рк╣рлБркВ ркХрк░рлНркдрк╛ рк╣рлЛрк╡рк╛ ркЫркдрк╛ркВ рккркг ркдрлБркВ ркоркирлЗ ркЕркХрк░рлНркдрк╛ ркЕркирлЗ ркЕрк╡рк┐ркХрк╛рк░рлА ркЬрк╛ркг.

рди рдорд╛рдВ рдХрд░реНрдорд╛рдгрд┐ рд▓рд┐рдореНрдкрдиреНрддрд┐ рди рдореЗ рдХрд░реНрдордлрд▓реЗ рд╕реНрдкреГрд╣рд╛ |

рдЗрддрд┐ рдорд╛рдВ рдпреЛрд╜рднрд┐рдЬрд╛рдирд╛рддрд┐ рдХрд░реНрдорднрд┐рд░реНрди рд╕ рдмрдзреНрдпрддреЗ || 14 ||

Activities do not taint me, nor do I desire the fruits of action. One who knows me in this way is never bound by the karmic reactions of work.(source: holy-bhagavad-gita.org)

ркХрлЛркИ ркХрк░рлНркорлЛ ркоркирлЗ рк▓рлЗрккркдрк╛ ркиркерлА, ркХрлЗрко ркХрлЗ ркХрк░рлНркорлЛркирк╛ рклрк│ркорк╛ркВ ркоркирлЗ рк▓рк╛рк▓рк╕рк╛ ркиркерлА. ркЖ рк░рлАркдрлЗ ркЬрлЗ ркоркирлБрк╖рлНркп ркоркирлЗ ркЬрк╛ркгрлЗ ркЫрлЗ, ркдрлЗ рккрлЛркдрк╛ркирк╛ ркХрк░рлНркорлЛ рк╡ркбрлЗ ркмркВркзрк╛ркдрлЛ ркиркерлА.

Based on occupation & activities, God created the following 4 Varnas:

  • Brahmins - predisposed toward teaching and worship (how to get the God or go to heaven)
  • Kshatriyas - inclined toward administration and management of the kingdom
  • Vaishyas - form the business and agricultural class (Businessmen)
  • Shudras - working class (The actual person who works)

In the same way, we also need 4 Departments in our Business.

  • Brahmins - Marketing - Do the marketing & they actually help us to meet our God (Our Customer).
  • Kshatriya - HR - Form a Business, Hire Team, Appoint People, Make Policies, define Penalties, etc.
  • Vaishyas - Operations - Administration & Management (or your Top Management Team).
  • Shudra - Technical - Actual working people, our employees who actually do work

What God did is, created these 4 Varnas and given them their duties and activities that they need to perform and he simply became A-Karta (non-doer and eternal).

We as CEO, also need to do that same thing. Create these 4 Departments, assign them their duties and just become an external observer. Then all you need to do is, whenever they got stuck, help them, guide them or train them. That's it.

So just simply, Be a God of your Company.

You can also listen to the full podcast here.

February 01, 20201 minuteMitul GolakiyaMitul Golakiya
4 Varna in Gita vs 4 Departments in Business

Shreemad Bhagavad Gita has a lot to say about business management. In the last Post of Karma-Yoga, we have seen how our actions should be for the benefits of the others. Today, let's see Chapter 4.

In Chapter 4, Karma-Brahm-Arpan-Yoga (J├▒─Бna Karm Sany─Бs Yog), verse 13th and 14th, Lord Krishna said,

рдЪрд╛рддреБрд░реНрд╡рд░реНрдгреНрдпрдВ рдордпрд╛ рд╕реГрд╖реНрдЯрдВ рдЧреБрдгрдХрд░реНрдорд╡рд┐рднрд╛рдЧрд╢: |

рддрд╕реНрдп рдХрд░реНрддрд╛рд░рдордкрд┐ рдорд╛рдВ рд╡рд┐рджреНрдзреНрдпрдХрд░реНрддрд╛рд░рдорд╡реНрдпрдпрдореН || 13 ||

The four categories of occupations were created by me according to peopleтАЩs qualities and activities. Although I am the creator of this system, know me to be the non-doer and eternal. (source: holy-bhagavad-gita.org)

рккрлНрк░ркХрлГркдрк┐ркирк╛ ркдрлНрк░ркг ркЧрлБркгрлЛ ркПркирлНркб ркХрк░рлНркорлЛркирк╛ рк╡рк┐ркнрк╛ркЧ рккрлНрк░ркорк╛ркгрлЗ ркорлЗркВ ркмрлНрк░рк╛рк╣рлНркоркг, ркХрлНрк╖ркдрлНрк░рк┐ркп, рк╡рлИрк╢рлНркп ркЕркирлЗ рк╢рлБркжрлНрк░ ркПрко ркЪрк╛рк░ рк╡рк░рлНркгрлЛркирлА рк░ркЪркирк╛ ркХрк░рлА ркЫрлЗ. ркдрлЗркирлЛ рк╣рлБркВ ркХрк░рлНркдрк╛ рк╣рлЛрк╡рк╛ ркЫркдрк╛ркВ рккркг ркдрлБркВ ркоркирлЗ ркЕркХрк░рлНркдрк╛ ркЕркирлЗ ркЕрк╡рк┐ркХрк╛рк░рлА ркЬрк╛ркг.

рди рдорд╛рдВ рдХрд░реНрдорд╛рдгрд┐ рд▓рд┐рдореНрдкрдиреНрддрд┐ рди рдореЗ рдХрд░реНрдордлрд▓реЗ рд╕реНрдкреГрд╣рд╛ |

рдЗрддрд┐ рдорд╛рдВ рдпреЛрд╜рднрд┐рдЬрд╛рдирд╛рддрд┐ рдХрд░реНрдорднрд┐рд░реНрди рд╕ рдмрдзреНрдпрддреЗ || 14 ||

Activities do not taint me, nor do I desire the fruits of action. One who knows me in this way is never bound by the karmic reactions of work.(source: holy-bhagavad-gita.org)

ркХрлЛркИ ркХрк░рлНркорлЛ ркоркирлЗ рк▓рлЗрккркдрк╛ ркиркерлА, ркХрлЗрко ркХрлЗ ркХрк░рлНркорлЛркирк╛ рклрк│ркорк╛ркВ ркоркирлЗ рк▓рк╛рк▓рк╕рк╛ ркиркерлА. ркЖ рк░рлАркдрлЗ ркЬрлЗ ркоркирлБрк╖рлНркп ркоркирлЗ ркЬрк╛ркгрлЗ ркЫрлЗ, ркдрлЗ рккрлЛркдрк╛ркирк╛ ркХрк░рлНркорлЛ рк╡ркбрлЗ ркмркВркзрк╛ркдрлЛ ркиркерлА.

Based on occupation & activities, God created the following 4 Varnas:

  • Brahmins - predisposed toward teaching and worship (how to get the God or go to heaven)
  • Kshatriyas - inclined toward administration and management of the kingdom
  • Vaishyas - form the business and agricultural class (Businessmen)
  • Shudras - working class (The actual person who works)

In the same way, we also need 4 Departments in our Business.

  • Brahmins - Marketing - Do the marketing & they actually help us to meet our God (Our Customer).
  • Kshatriya - HR - Form a Business, Hire Team, Appoint People, Make Policies, define Penalties, etc.
  • Vaishyas - Operations - Administration & Management (or your Top Management Team).
  • Shudra - Technical - Actual working people, our employees who actually do work

What God did is, created these 4 Varnas and given them their duties and activities that they need to perform and he simply became A-Karta (non-doer and eternal).

We as CEO, also need to do that same thing. Create these 4 Departments, assign them their duties and just become an external observer. Then all you need to do is, whenever they got stuck, help them, guide them or train them. That's it.

So just simply, Be a God of your Company.

You can also listen to the full podcast here.

January 24, 20202 minutesMitul GolakiyaMitul Golakiya
12 Business Learnings of 2019

2019 was a great year for us in terms of business as well as in my personal life. We had some major breakdowns which taught us lots of good lessons while we resolved them.

1. Do not get your company to rely on one major client

The major mistake we made was our 80% staff had been working for one client for years. And when that work got stopped the 80% company had no work with 50% staff was a senior and experienced developer with top salaries.

Of course, a long term relationship is important but always keep working with multiple clients/people. It will keep your business moving even if one of your work got stopped for whatsoever reason. Because even if you have top talent, getting really good clients is too tough in the market.

2. Everything starts with YOU

Before you transform your business, the first thing that needs to be transformed is yourself. Once you start transforming everything else into your business, your team will start transforming automatically.

Your team learns a lot from you, they are your main observers. Once they see you transforming, their life will also start getting transformed.

3. Wake up Early

All great leaders are early birds. Once you win your morning, you can win the rest of the day. 3 hours of early mornings are the main productive hours. ThatтАЩs the time when you can complete things that you are not able to complete throughout your day or you are not getting time for.

Also waking up at a fixed early morning time will help you a lot in your health. Wake up at 5 am at least, do some exercise, read, and complete the most important thing in the morning only.

4. Power of Reading

тАЬNot every Reader is a Leader but every Leader is a Reader.тАЭ. This sentence has a lot to say. Once you start reading it will transform your life a lot. The good book contains years of research by the author. So you can directly get those years of knowledge by reading that book in just a few days.

5. Increase your Networking

I will say you should meet lots of people. Meet them, talk with them, know them, learn from them even if you are not working with local people.

Plan to meet one good CEO or Coach every month. Invite them to lunch or dinner and try to learn as much as you can from them. Ask about their processes, structures, systems, technologies, etc.

6. Contribution to otherтАЩs lives

When you contribute to other peopleтАЩs lives, that contribution will come directly back to you by double. When you transform their life, your life will automatically get transformed.

7. Get a Coach or Mentor

Always surround yourself with Coaches and Mentors at each stage of life. In Business and Personal life as well. Your coach can be anyone from Friends, Family, or some specialized Mentors and Coaches.

You always need someone who can push you, help you, guide you. Get someone who can give your honest and transparent advice and guidance.

8. Never stop Learning

Never stop learning. Always learn something every day or at least a week. Read Books or Watch Videos or Learn new technologies or Purchase some Courses. Even if you are super busy, put a dedicated time to watch 10 mins video or Read 10 mins every day.

In the long run, just 10 mins of every day will help you a lot.

9. Write Daily Journal

Writing your daily Journal helps a lot. List down your todayтАЩs achievements and your tomorrowтАЩs goals. It will help you track your daily progress and plan your day off tomorrow.

When you write a Journal, you will have an exact idea on the next day, what are your priorities in the morning only. Once you plan your day a day, it has tremendous benefits.

10. Delegation

Delegation is really powerful. Before doing any task, just think if you can delegate it then delegate it. Your time is limited and precious, put it on the things where itтАЩs needed rather than doing things that someone else can do from your team.

And if they are not able to do it right now, start training them and make them capable to take off your load.

11. Power of ToDo List

Start Maintaining To-Do list. It has huge power and will bring a great impact. Anything that you need to do, add to your ToDo list. Need to make a call to a friend? add it. Need to send an Email to the client? Add it.

Every small thing should be added to the ToDo list with a due date if possible. It will help you prioritize your tasks and motivate you at the end of the day when you check the list of complete things.

12.Write a Blog

Start writing your blog. It doesnтАЩt need to be fancy or content-rich. Just write down anything that seems to be useful to at least one person in the world. Just write down about things that came to you across the day.

Your blog post doesnтАЩt need to be long. Just write 2-3 small paragraphs and thatтАЩs it. But at least start writing something daily/weekly whatever is possible for you.

Hope you enjoyed it and see you next year with new learnings.

January 23, 20204 minutesMitul GolakiyaMitul Golakiya