So this is an interesting one... normally the answer is to make the following changes to your composer.json. You tell composer where to find the repository and that you want the dev-<BRANCH>@dev (dev- prefix means that you want a branch and @dev suffix indicates composer is allowed to install a development dependency).
So like this:
{
"require": {
"pion/laravel-chunk-upload": "dev-fix-#143@dev"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/Janith-Umeda/laravel-chunk-upload"
}
]
}
However... in this case this won't work since the author used a # in their branch name 🙈 Composer parses dev-fix-#143@dev as branch fix- with commit hash 143 which is not what you need. There seems to be no way around this too (see: https://github.com/composer/composer/issues/5420).
So what you can do, is fork the repo yourself and make a branch named something like fix-143 and commit the fix to that and then use the above changes to your composer.json to install it. But don't use any special characters (except for a /) in your branch name because that will probably confuse composer.
Long story but hopefully this helps!