PHPackages                             tjventurini/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. tjventurini/service-provider

ActivePackage

tjventurini/service-provider
============================

A simple laravel ServiceProvider class for standardized packages.

v0.0.2(5y ago)3221MITPHP

Since Feb 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tjventurini/service-provider)[ Packagist](https://packagist.org/packages/tjventurini/service-provider)[ RSS](/packages/tjventurini-service-provider/feed)WikiDiscussions main Synced 1mo ago

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

Service Provider (BETA)
=======================

[](#service-provider-beta)

This package provides a the `SimpleServiceProvider` class that you can use to speed up your laravel package development.

This package was not inspired but highly influenced by [spatie/lravel-package-tools](https://github.com/spatie/laravel-package-tools) 😉

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

[](#installation)

To install this package you can run the following.

```
composer require tjventurini/service-provider

```

In order to use it in a package you should add it as a dependency in your `composer.json` file.

Features
--------

[](#features)

- Automatically detect resources provided by your package 🔍
- Can handle and autodetect configuration
- Can handle and autodetect migrations
- Can handle and autodetect translations
- Can handle and autodetect views
- Can handle artisan commands
- Can handle services
- Can handle and autodetect graphql schema
- Can handle graphql namespaces
- Can handle route files

Usage
-----

[](#usage)

To use the `SimpleServiceProvider` class just extend it on your `ServiceProvider`.

```
use Tjventurini\ServiceProvider\SimpleServiceProvider;

class YourPackageServiceProvider extends SimpleServiceProvider
```

Per default the service provider will try to detect and setup the resources provided by your package without further steps required from you. If you want or need more flexibility for your setup, read on.

Configuration
-------------

[](#configuration)

```
use Tjventurini\ServiceProvider\SimpleServiceProvider;

class YourPackageServiceProvider extends SimpleServiceProvider
{
    /**
     * Setup the configuration for the given package.
     *
     * @param  Package $Package
     * @return void
     */
    public function configurePackage(Package $Package): void
    {
        $Package
            ->setPackageSlug('your-package-slug')
            ->hasConfig()
            ->hasMigrations()
            ->hasTranslations()
            ->hasCommands([
                SomeCommand::class,
                AnotherCommand::class
            ])
            ->hasGraphQLSchema()
            ->hasGraphQLNamespaces([
                'models' => 'Foo\\Bar'
            ])
            ->registerService(SomeService::class)
            ->registerService(ServiceWithConfig::class, ['api_key' => 'some-key'])
            ->hasWebRoutes()
            ->hasApiRoutes()
            ->registerRouteFile('routes/admin.php');
    }
}
```

For more information check out the [SimpleServiceProvider](src/SimpleServiceProvider.php) and [Package](src/Package.php) classes 🕵

Roadmap 🛣
---------

[](#roadmap-)

- Autodetect commands
- Autodetect services
- Autodetect graphql namespaces
- Enable handling of multiple configuration files
- Enable handling of multiple graphql schema files

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~26 days

Total

2

Last Release

1893d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/daf1f2889ddf906730ee2193db9589a470a6576ef99be86cf3f5ce6ae68baaff?d=identicon)[tjventurini](/maintainers/tjventurini)

---

Top Contributors

[![tjventurini](https://avatars.githubusercontent.com/u/4708070?v=4)](https://github.com/tjventurini "tjventurini (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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