PHPackages                             graham-campbell/manager - 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. graham-campbell/manager

ActiveLibrary[Framework](/categories/framework)

graham-campbell/manager
=======================

Manager Provides Some Manager Functionality For Laravel

v5.3.0(2mo ago)39221.1M—1%4020MITPHPPHP ^7.4.15 || ^8.0.2CI passing

Since May 31Pushed 1w ago5 watchersCompare

[ Source](https://github.com/GrahamCampbell/Laravel-Manager)[ Packagist](https://packagist.org/packages/graham-campbell/manager)[ GitHub Sponsors](https://github.com/GrahamCampbell)[ Fund](https://tidelift.com/funding/github/packagist/graham-campbell/manager)[ RSS](/packages/graham-campbell-manager/feed)WikiDiscussions 5.3 Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (44)Used By (20)

Laravel Manager
===============

[](#laravel-manager)

Laravel Manager was created by, and is maintained by [Graham Campbell](https://github.com/GrahamCampbell), and provides some manager functionality for [Laravel](https://laravel.com/). Feel free to check out the [change log](CHANGELOG.md), [releases](https://github.com/GrahamCampbell/Laravel-Manager/releases), [security policy](https://github.com/GrahamCampbell/Laravel-Manager/security/policy), [license](LICENSE), [code of conduct](.github/CODE_OF_CONDUCT.md), and [contribution guidelines](.github/CONTRIBUTING.md).

[![Banner](https://user-images.githubusercontent.com/2829600/71477504-680d0f80-27e2-11ea-9acd-befa0b3e3a8f.png)](https://user-images.githubusercontent.com/2829600/71477504-680d0f80-27e2-11ea-9acd-befa0b3e3a8f.png)

[![Build Status](https://camo.githubusercontent.com/488659bcaf3c96b169b05086ee281213746557993e9b37a07e35d921732da7f9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f47726168616d43616d7062656c6c2f4c61726176656c2d4d616e616765722f74657374732e796d6c3f6c6162656c3d5465737473267374796c653d666c61742d737175617265)](https://github.com/GrahamCampbell/Laravel-Manager/actions?query=workflow%3ATests)[![StyleCI Status](https://camo.githubusercontent.com/c96692cf7df2512652767b13230ec6a112f059c54ce0a29b0569f3e66c718b40/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f31393833363236322f736869656c64)](https://github.styleci.io/repos/19836262)[![Software License](https://camo.githubusercontent.com/c090e080484e2a2bc766446291d04437db823929042bf614b26a1643660ddf6f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e3f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist Downloads](https://camo.githubusercontent.com/bd01218df03a7d949d32dd905a6926c974670df68b7b6ca4ff7d018cce445e73/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67726168616d2d63616d7062656c6c2f6d616e616765723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graham-campbell/manager)[![Latest Version](https://camo.githubusercontent.com/e273e55963d36a93f016a98d4acd6b07a7e940eafdbd9a6308054c9db9afe749/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f47726168616d43616d7062656c6c2f4c61726176656c2d4d616e616765723f7374796c653d666c61742d737175617265)](https://github.com/GrahamCampbell/Laravel-Manager/releases)

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

[](#installation)

This version requires [PHP](https://www.php.net/) 7.4-8.5 and supports [Laravel](https://laravel.com/) 8-13.

ManagerL5.5L5.6L5.7L5.8L6L7L8L9L10L11L12L134.7✅✅✅✅✅✅✅✅❌❌❌❌5.3❌❌❌❌❌❌✅✅✅✅✅✅To get the latest version, simply require the project using [Composer](https://getcomposer.org/):

```
$ composer require "graham-campbell/manager:^5.3"
```

Once installed, you can extend or implement the classes in this package to speed up writing Laravel packages further. There are no service providers to register.

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

[](#configuration)

Laravel Manager requires no configuration. Just follow the simple install instructions and go!

Usage
-----

[](#usage)

##### ConnectorInterface

[](#connectorinterface)

This interface defines one public method.

The `'connect'` method accepts one parameter which is an array of config.

This interface is not used by this package, but is used by the likes of [Laravel Flysystem](https://github.com/GrahamCampbell/Laravel-Flysystem).

##### ManagerInterface

[](#managerinterface)

This interface defines the public methods a manager class must implement.

The `'connection'` method accepts one optional parameter (the connection name), and will return a connection instance and will reuse a previous connection from the pool if possible.

The `'reconnect'` method accepts one optional parameter (the connection name), and will return a connection instance after forcing a re-connect.

The `'disconnect'` method accepts one optional parameter (the connection name), and will return nothing after removing the connection from the pool.

The `'getConnectionConfig'` method has one required parameter (the connection name), and will return the config for the specified connection.

The `'getDefaultConnection'` method will return the default connection as specified in the config.

The `'setDefaultConnection'` method has one required parameter (the connection name), and will return nothing after setting the default connection.

The `'extend'` method has two required parameter. The first is the name of a connection, or the name of a connection driver. The second parameter must be `callable`. The purpose of this method is to add custom connection creation methods on the fly. The second parameter must return a connection.

The `'getConnections'` method will return an array of all the connections currently in the pool.

##### AbstractManager

[](#abstractmanager)

This abstract class implements the `ManagerInterface`. It has two abstract protected methods that must be implemented by extending classes.

The `'createConnection'` method will be called with the specific connection config as the first parameter. It must return a connection instance.

The `'getConfigName'` method must return the name of the connection config. This may be `'yourname\yourpackage'` for example.

You can also dynamically call methods on the default connection due to the use of `__call` so instead of writing `->connection()->methodName()`, you can just jump straight in with `->methodName()`.

##### Further Information

[](#further-information)

You may see an example of implementation in [Laravel Flysystem](https://github.com/GrahamCampbell/Laravel-Flysystem), [Laravel DigitalOcean](https://github.com/GrahamCampbell/Laravel-DigitalOcean), and [Laravel GitHub](https://github.com/GrahamCampbell/Laravel-GitHub).

Security
--------

[](#security)

If you discover a security vulnerability within this package, please send an email to . All security vulnerabilities will be promptly addressed. You may view our full security policy [here](https://github.com/GrahamCampbell/Laravel-Manager/security/policy).

License
-------

[](#license)

Laravel Manager is licensed under [The MIT License (MIT)](LICENSE).

For Enterprise
--------------

[](#for-enterprise)

Available as part of the Tidelift Subscription

The maintainers of `graham-campbell/manager` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-graham-campbell-manager?utm_source=packagist-graham-campbell-manager&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

###  Health Score

74

—

ExcellentBetter than 100% of packages

Maintenance93

Actively maintained with recent releases

Popularity68

Solid adoption and visibility

Community37

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

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

Recently: every ~107 days

Total

44

Last Release

60d ago

Major Versions

v0.1.0-alpha → v1.0.0-RC12014-07-16

v1.0.4 → v2.0.02015-02-05

v2.5.0 → v3.0.02017-08-06

3.0.x-dev → v4.0.02018-02-11

4.7.x-dev → 5.0.x-dev2023-02-25

PHP version history (6 changes)v0.1.0-alphaPHP &gt;=5.4.7

v2.1.0PHP &gt;=5.5.9

v3.0.0PHP ^7.0

v4.0.0PHP ^7.1.3

v4.6.0PHP ^7.1.3 || ^8.0

5.0.x-devPHP ^7.4.15 || ^8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d95eb26cb8f3919bb5ca3b6d823daeabbf259663778a970349b245c580713c8e?d=identicon)[graham-campbell](/maintainers/graham-campbell)

---

Top Contributors

[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (265 commits)")[![cozylife](https://avatars.githubusercontent.com/u/81341241?v=4)](https://github.com/cozylife "cozylife (2 commits)")[![garagesocial](https://avatars.githubusercontent.com/u/2416014?v=4)](https://github.com/garagesocial "garagesocial (1 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (1 commits)")

---

Tags

hacktoberfestframeworklaravelinterfacemanagerGraham CampbellGrahamCampbellconnectorLaravel Manager

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/graham-campbell-manager/health.svg)

```
[![Health](https://phpackages.com/badges/graham-campbell-manager/health.svg)](https://phpackages.com/packages/graham-campbell-manager)
```

###  Alternatives

[graham-campbell/markdown

Markdown Is A CommonMark Wrapper For Laravel

1.3k7.1M64](/packages/graham-campbell-markdown)[graham-campbell/throttle

Throttle Is A Rate Limiter For Laravel

7102.3M11](/packages/graham-campbell-throttle)[graham-campbell/github

GitHub Is A GitHub Bridge For Laravel

6411.7M19](/packages/graham-campbell-github)[graham-campbell/exceptions

Provides A Powerful Error Response System For Both Development And Production

5911.3M4](/packages/graham-campbell-exceptions)[graham-campbell/digitalocean

DigitalOcean Is A DigitalOcean Bridge For Laravel

509343.1k2](/packages/graham-campbell-digitalocean)[graham-campbell/gitlab

GitLab Is A GitLab Bridge For Laravel

141584.1k2](/packages/graham-campbell-gitlab)

PHPackages © 2026

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