Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

iftekhs's avatar
Level 13

How to Install Global Packages for All Laravel Nova Custom Tools?

Hi, So I'm using laravel nova and I want to know is there any way that I can install global packages that will be included in every custom tool I create in nova? For example now I create a custom tool called "site/setting" and a new custom tool called "site/api" now lets say I want to use a package in both of these tools I have to install them on each tool seperately is there a way to do it for all tools?

0 likes
3 replies
LaryAI's avatar
LaryAI
AI
Best Answer
Level 58

Yes, there is a way to install global packages for all Laravel Nova custom tools. You can achieve this by creating a Composer package that includes the required global packages as dependencies.

Here are the steps to follow:

  1. Create a new Composer package by running the following command in your terminal:
composer init
  1. Fill in the required information for your package, such as name, description, and version.

  2. Open the composer.json file of your package and add the global packages you want to include as dependencies. For example, if you want to include the laravel/nova package, add it to the require section like this:

"require": {
    "laravel/nova": "^3.0"
}
  1. Save the composer.json file and run the following command to install the dependencies:
composer install
  1. Publish your package to a package repository, such as Packagist, so that it can be easily installed in other projects.

  2. In your Laravel Nova custom tools, require your package as a dependency by adding it to the composer.json file of your custom tool. For example:

"require": {
    "your-package-name": "^1.0"
}
  1. Run composer update in your custom tool's directory to install the package.

By following these steps, you can create a Composer package that includes the global packages you need for all your Laravel Nova custom tools. This way, you only need to install the package once, and it will be available in all your custom tools.

Note: Make sure to replace "your-package-name" with the actual name of your Composer package.

hehe's avatar

Hello, Did you find a way to that ?

Thank you

iftekhs's avatar
Level 13

@hehe Hey! well this was a long time ago so I dont actually remember the exact thing I was working with but I think you can just install a package normally and you can then use it.

Please or to participate in this conversation.