PHPackages                             patinthehat/laravel-require - 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. [Framework](/categories/framework)
4. /
5. patinthehat/laravel-require

ActiveLibrary[Framework](/categories/framework)

patinthehat/laravel-require
===========================

Add a package with composer, and automatically registers the service provider.

2.3.0(9y ago)9241MITPHPPHP &gt;=5.6.4

Since Apr 9Pushed 9y ago2 watchersCompare

[ Source](https://github.com/patinthehat/laravel-require)[ Packagist](https://packagist.org/packages/patinthehat/laravel-require)[ Docs](https://permafrost-dev.com/laravel-require/)[ RSS](/packages/patinthehat-laravel-require/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (14)Used By (0)

laravel-require
---------------

[](#laravel-require)

---

This Laravel 5 package provides a `require:package` artisan command, which first installs a package via composer, then attempts to automatically register its service provider(s) and facades.

This makes it even easier to install a Laravel package!

*Written and tested with Laravel 5.4.*

---

#### Installation

[](#installation)

You may install this package using composer: `composer require patinthehat/laravel-require`

Once it's installed, you must add the service provider to the 'providers' section in your `config/app.php` file:

```
LaravelRequire\LaravelRequireServiceProvider::class,
```

You will now have a `require:package {package-name}` command available in artisan. It will attempt to automatically register the service provider for a package after installation, and will let you know if it is unable to do so. If this happens, you will have to register the package manually.

---

#### Requirements

[](#requirements)

In order for `laravel-require` to work properly, you must either have `composer.phar` in your project's base directory or have the `composer` command available in your environment's PATH variable.

---

#### Example Usage

[](#example-usage)

```
$ php artisan require:package laracasts/flash

```

This installs and registers the `flash` package from laracasts.

```
$ php artisan require:package laracasts/flash --register-only

```

This will skip running the `composer require` command entirely, and only attempt to register the package's Service Providers and Facades.

---

#### How it works

[](#how-it-works)

`laravel-require` first creates a list of files in the package that might contain a Service Provider or Facade. It first attempts to locate Service Providers/Facades through matching filenames. If this fails, the contents of the files are scanned to locate the Service Providers and Facades.

---

#### License

[](#license)

This package is open-source software, released under the [MIT license](LICENSE).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity65

Established project with proven stability

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 ~1 days

Total

13

Last Release

3355d ago

Major Versions

0.1.0 → 1.0.02017-04-09

1.2.0 → 2.0.02017-04-12

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5508707?v=4)[Patrick Organ](/maintainers/patinthehat)[@patinthehat](https://github.com/patinthehat)

---

Tags

artisanartisan-commandautomationcomposerlaravellaravel-5laravel-5-packagelaravel5composerframeworklaravelautomationlaravel-package

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/patinthehat-laravel-require/health.svg)

```
[![Health](https://phpackages.com/badges/patinthehat-laravel-require/health.svg)](https://phpackages.com/packages/patinthehat-laravel-require)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.5k](/packages/laravel-framework)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k91.3M282](/packages/laravel-horizon)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[laravel/envoy

Elegant SSH tasks for PHP.

1.6k5.8M23](/packages/laravel-envoy)

PHPackages © 2026

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