PHPackages                             soyhuce/livewire-component-auto-register - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. soyhuce/livewire-component-auto-register

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

soyhuce/livewire-component-auto-register
========================================

Auto-register Livewire components outside base namespace

0.3.0(1y ago)1921[5 PRs](https://github.com/Soyhuce/livewire-component-auto-register/pulls)MITPHPPHP ^8.4CI passing

Since Feb 10Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/Soyhuce/livewire-component-auto-register)[ Packagist](https://packagist.org/packages/soyhuce/livewire-component-auto-register)[ Docs](https://github.com/soyhuce/livewire-component-auto-register)[ GitHub Sponsors](https://github.com/soyhuce)[ RSS](/packages/soyhuce-livewire-component-auto-register/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (13)Versions (11)Used By (0)

Auto-register Livewire components outside base namespace
========================================================

[](#auto-register-livewire-components-outside-base-namespace)

[![Latest Version on Packagist](https://camo.githubusercontent.com/17cd1e07a58d8f8f6b527cfb9ab9b5c7625d861bda7dc4d97af7b5ed2ac6101b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f79687563652f6c697665776972652d636f6d706f6e656e742d6175746f2d72656769737465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/soyhuce/livewire-component-auto-register)[![GitHub Tests Action Status](https://camo.githubusercontent.com/ba9daeb8a7a05189809cbffa9ffbf0e4593de621b0b8616421d1ad2406b6e979/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736f79687563652f6c697665776972652d636f6d706f6e656e742d6175746f2d72656769737465722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/soyhuce/livewire-component-auto-register/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/2ae44ee9101e16de341c0ca16dec9cccf9eec4b0c80e6c0cd047b45dd48757bb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736f79687563652f6c697665776972652d636f6d706f6e656e742d6175746f2d72656769737465722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/soyhuce/livewire-component-auto-register/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![GitHub PHPStan Action Status](https://camo.githubusercontent.com/97664deeae186b5c4911b1b2cc783db917d3d78158ae43e9f127a8b44aef6ed5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736f79687563652f6c697665776972652d636f6d706f6e656e742d6175746f2d72656769737465722f7068707374616e2e796d6c3f6272616e63683d6d61696e266c6162656c3d7068707374616e)](https://github.com/soyhuce/livewire-component-auto-register/actions?query=workflow%3APHPStan+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ba382c155ea93de9636a17743e9ca317cb2ea24d08211604d8ec40230ea77c36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f79687563652f6c697665776972652d636f6d706f6e656e742d6175746f2d72656769737465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/soyhuce/livewire-component-auto-register)

Auto-register Livewire components outside base namespace

Livewire only supports having one root namespace for your components. This package allows you to automatically register components outside the base namespace.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require soyhuce/livewire-component-auto-register
```

You can publish the config file with:

```
php artisan vendor:publish --tag="livewire-component-auto-register-config"
```

Usage
-----

[](#usage)

In the `config/livewire-component-auto-register.php` file, you can specify the namespaces you want to register components from.

```
    'paths' => [
        'Support\\Livewire' => base_path('app/Support/Livewire'),
    ],
```

From now, all components in the `app/Support/Livewire` namespace will be automatically registered and be usable in your views. For example, if you have a component `app/Support/Livewire/ProgressBar.php`, you can use it in your views like this:

```

```

### Optimize discovery for production

[](#optimize-discovery-for-production)

Component discovery can be cached using the `livewire-component-auto-register:cache` command.

```
php artisan livewire-component-auto-register:cache
```

Cache can be cleared using the `livewire-component-auto-register:clear` command.

```
php artisan livewire-component-auto-register:clear
```

Commands are registered as optimization command inside Laravel, meaning that `php artisan optimize` and `php artisan optimize:clear` will automatically run them.

### Generate IDE Helper file

[](#generate-ide-helper-file)

Sometimes, your IDE may not be able to resolve the components correctly (particularly Laravel IDEA plugin). You can generate a helper file using the `livewire-component-auto-register:ide-helper` command.

```
php artisan livewire-component-auto-register:ide-helper
```

You can configure ide-helper file path in the configuration file.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Bastien Philippe](https://github.com/bastien-phi)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance70

Regular maintenance activity

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~17 days

Total

3

Last Release

425d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/206cfbf866a463f7e7d1e86946d59b82f4191b9c89f9981fb03eeb264d77af79?d=identicon)[SoyHuCe](/maintainers/SoyHuCe)

---

Top Contributors

[![bastien-phi](https://avatars.githubusercontent.com/u/10199039?v=4)](https://github.com/bastien-phi "bastien-phi (14 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelsoyhucelivewire-component-auto-register

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/soyhuce-livewire-component-auto-register/health.svg)

```
[![Health](https://phpackages.com/badges/soyhuce-livewire-component-auto-register/health.svg)](https://phpackages.com/packages/soyhuce-livewire-component-auto-register)
```

###  Alternatives

[leandrocfe/filament-apex-charts

Apex Charts integration for Filament PHP.

4861.2M8](/packages/leandrocfe-filament-apex-charts)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[keepsuit/laravel-temporal

Laravel temporal.io

4875.0k](/packages/keepsuit-laravel-temporal)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
