If you want to use a forked package in Laravel, here are the steps you need to follow:

  1. Create a fork of the package on GitHub.

  2. Create a new branch in the fork which will contain your changes.

  3. Make the necessary changes to the package in the new branch.

  4. Push the changes to the fork.

  5. Update the composer.json file in your Laravel project to point to the forked package.

    {
        "require": {
            "<original-owner>/<package-name>": "dev-<branchname>",
        },
        "repositories": [
            {
            "type": "vcs",
            "url": "https://github.com/<fork-owner>/<package-name>"
            }
        ]
    }
    
    
  6. Run composer update to install the forked package.

If you didn't have the package installed yet, you can tell composer to install a specific version:

composer require <original-owner>/<package-name>:dev-<branchname>

Based on the instructions found here and here.