PHPackages                             laradic/service-provider - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. laradic/service-provider

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

laradic/service-provider
========================

Laravel 5 service provider on steroids. Lots of extras.

1.0.0(8y ago)02771MITPHPPHP &gt;=5.5.9

Since May 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/laradic/service-provider)[ Packagist](https://packagist.org/packages/laradic/service-provider)[ Docs](https://la.radic.nl)[ RSS](/packages/laradic-service-provider/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (7)Versions (3)Used By (1)

Laradic Service Provider
========================

[](#laradic-service-provider)

[![License](https://camo.githubusercontent.com/30597ff9a350144f03bffdd9183e16468e0b3ca1193e1d08591d992622738d55/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://tldrlegal.com/license/mit-license)

A general support package for the Laravel 5 framework. Laradic Support provides flexible and reusable components of code for commonly used functionality as well as the means to customize the default Laravel 5 folder structure.

The package follows the FIG standards PSR-1, PSR-2, and PSR-4 to ensure a high level of interoperability between shared PHP code.

Quick Installation
------------------

[](#quick-installation)

Begin by installing the package through Composer.

```
composer require laradic/service-provider=~1.0
```

Documentation
-------------

[](#documentation)

The full documentation can be found [here](https://la.radic.nl/service-provider)

Quick overview
--------------

[](#quick-overview)

The code you write in your Service Providers is often very repetative and feels like you've already done so a hundreth times.

**Laradic ServiceProvider** might just be the thing you where looking for. It's a modular, configurable and very extendable way of creating providers. I think some examples might better explain it.

### Examples

[](#examples)

#### Resources Example

[](#resources-example)

A comparison of handling resources.

**The "default" way**Use predefined methods inside your `register` and/or `boot` directory to hook up to the `vendor:publish` command.

```
class MyServiceProvider extends \Illuminate\Support\ServiceProvider {
    public function boot(){
        // config: blade-extensions
        $publishPath = function_exists('config_path') ? config_path('blade_extensions.php') : base_path('config/blade_extensions.php');
        $this->publishes([ __DIR__ . '/../config/blade_extensions.php' => $publishPath ], 'config');

        // views: blade-ext
        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'blade-ext');
        $this->publishes([ __DIR__ . '/../resources/views' => resource_path('views/vendor/blade-ext') ], 'views');

        // migrations
        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');

        // translations
        $this->loadTranslationsFrom(__DIR__.'/../resources/trans', 'blade-ext');
        $this->publishes([__DIR__.'/../resources/trans' => resource_path('lang/vendor/blade-ext') ]);

        // assets
        $this->publishes([ __DIR__.'/../resources/assets' => public_path('vendor/blade-ext')], 'public');
    }

    public function register(){
        $this->mergeConfigFrom(__DIR__ . '/../config/blade_extensions.php', 'blade_extensions');
    }
}
```

**The "Laradic" way**Override properties to define key values.

```
class MyServiceProvider extends \Laradic\ServiceProvider\ServiceProvider {
    protected $configFiles = ['blade_extensions'];
    protected $viewDirs = ['views' => 'blade-ext'];
    protected $migrationDirs = ['migrations'];
    protected $translationDirs = ['trans' => 'blade-ext'];
    protected $assetDirs = ['assets' => 'blade-ext'];
}
```

Of course, it's entirely possible to re-configure paths as well. You don't have to stick to the default directory structure. But that's beyond the scope of this example and can be found in the documentation.

#### Bindings and Commands Example

[](#bindings-and-commands-example)

**The "default" way**

**The "Laradic" way**Override properties to define key values.

```
class MyServiceProvider extends \Laradic\ServiceProvider\ServiceProvider {
    // Will look for all commands inside the 'Console' directory relative to this service provider
    protected $findCommands = ['Console'];
}
```

or

```
class MyServiceProvider extends \Laradic\ServiceProvider\ServiceProvider {
    // Register by FQN
    protected $commands = [Console\MyCommand::class];
    // or by custom binding name
    protected $commands = ['commands.my.command' => Console\MyCommand::class];
}
```

Again, more variations and options exist which are beyond the scope of this example. Go read the [documentation](https://la.radic.nl/service-provider)

### Register and Boot

[](#register-and-boot)

The `ServiceProvider` does not override existing functionality. Its entirely possible to let it ignore all the xtra stuff. If you want to use the `register` and `boot` methods while

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3274d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/303828383a9c2bf382436a61f4471425428b28c095c6df9a9714444cbc163538?d=identicon)[radic](/maintainers/radic)

---

Tags

containerlaraveliocserviceproviderstructurerepositorieslaradic

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laradic-service-provider/health.svg)

```
[![Health](https://phpackages.com/badges/laradic-service-provider/health.svg)](https://phpackages.com/packages/laradic-service-provider)
```

###  Alternatives

[league/container

A fast and intuitive dependency injection container.

86387.8M343](/packages/league-container)[godruoyi/easy-container

A small PHP 5.3 dependency injection container extended from Laravel container.

334.9k2](/packages/godruoyi-easy-container)

PHPackages © 2026

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