New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

patinthehat/laravel-require

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

Larablocks Analysis

patinthehat/laravel-require works with any PHP project: the latest release (2.3.0, Apr 23, 2017) doesn't depend on Laravel.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • No release in the last 12 months (last: Apr 23, 2017)
  • 0 downloads a month (needs 10,000)
  • 9 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Apr 23, 2017.
  • No releases in the last 12 months.
  • First released: Apr 9, 2017.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.

Install
composer require patinthehat/laravel-require
Latest Version:2.3.0
PHP:>=5.6.4
License:MIT
Last Updated:Apr 24, 2017
Links: GitHub  ·  Packagist
Maintainer: patinthehat

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

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

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
$ 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

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

This package is open-source software, released under the MIT license.

Related Packages

patinthehat/laravel-package-manager

Package manager for Laravel 5+.

20 10
knackline/laravel-toon

A powerful Laravel package for integrating Toon functionality into your Laravel...

11,138 1
simovative/zeus

A Post-Redirect-Get specialised framework for PHP

122,996 7
isapp/tinyeditor-picture-tag

Easily convert <img> to responsive <picture> tags for TinyMCE with Laravel helpe...

431 0
szymku/laravel-fundamentals

Only for test.

10 0

Version History

Version Released PHP License
2.3.0 >=5.6.4 MIT
2.2.3 >=5.6.4 MIT
2.2.2 >=5.6.4 MIT
2.2.1 >=5.6.4 MIT
2.2.0 >=5.6.4 MIT