PHPackages                             rpdvlpr/configcat-laravel - 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. rpdvlpr/configcat-laravel

ActiveLibrary

rpdvlpr/configcat-laravel
=========================

Laravel plugin for the ConfigCat php-sdk

1.0.0(6y ago)07MITPHPPHP &gt;=5.5

Since Jun 21Pushed 6y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

ConfigCat Laravel Plugin for ConfigCat PHP SDK
==============================================

[](#configcat-laravel-plugin-for-configcat-php-sdk)

ConfigCat SDK for PHP provides easy integration between ConfigCat service and applications using PHP.

ConfigCat is a feature flag, feature toggle, and configuration management service. That lets you launch new features and change your software configuration remotely without actually (re)deploying code. ConfigCat even helps you do controlled roll-outs like canary releases and blue-green deployments.

[![Build Status](https://camo.githubusercontent.com/d467683ad16cfa8f914a3d07143ebb43579755940b5b45ec5327b7b470d92e69/68747470733a2f2f7472617669732d63692e636f6d2f636f6e6669676361742f7068702d73646b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/configcat/php-sdk)[![Coverage Status](https://camo.githubusercontent.com/6c8735faea064b3feabf2b4c79f4ea7c9201da20bd3397f2fc874301e78b91bf/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f436f6e6669674361742f7068702d73646b2e737667)](https://codecov.io/gh/ConfigCat/php-sdk)[![Latest Stable Version](https://camo.githubusercontent.com/ade3ac263d2d0ffeb63ad1399946a81ac255d395e0fd18c812ea6a4e30576a53/68747470733a2f2f706f7365722e707567782e6f72672f636f6e6669676361742f636f6e6669676361742d6c61726176656c2f76657273696f6e)](https://packagist.org/packages/configcat/configcat-laravel)[![Total Downloads](https://camo.githubusercontent.com/3fa9d3725f284f6dc0ff32bbc72d33615b9f20dc485ed55dd75e3ac7a8651ad4/68747470733a2f2f706f7365722e707567782e6f72672f636f6e6669676361742f636f6e6669676361742d6c61726176656c2f646f776e6c6f616473)](https://packagist.org/packages/configcat/configcat-laravel)[![Latest Unstable Version](https://camo.githubusercontent.com/90ad1c453ae5690d58d1ce908e1820a6a86f4f29b0f1c53fe02abe506e43cdf9/68747470733a2f2f706f7365722e707567782e6f72672f636f6e6669676361742f636f6e6669676361742d6c61726176656c2f762f756e737461626c65)](https://packagist.org/packages/configcat/configcat-laravel)

Getting started
---------------

[](#getting-started)

### 1. Install the package with [Composer](https://getcomposer.org/)

[](#1-install-the-package-with-composer)

```
composer require rpdvlpr/configcat-laravel
```

This will install:

- The ConfigCat PHP SDK in vendor\\configcat\\configcat-client
- The ConfigCat Laravel Plugin in vendor\\configcat\\configcat-laravel

### 2. Enable ConfigCat Plugin in Laravel

[](#2-enable-configcat-plugin-in-laravel)

*Note: you can skip this step if you have Laravel 5.5+*
First, we need to add the ConfigCat Services to the list of Providers in config/app.php:

```
// config/app.php
'providers' => array(
    // ...
    Rpdvlpr\Config\ConfigCatServiceProvider::class,
);
```

If you want to use an ConfigCat facade, add an alias in the same file (not required):

```
// config/app.php
'aliases' => [
    // ...
    'ConfigCat' => Rpdvlpr\Config\Facade\ConfigCat::class,
];
```

### 3. Load configuration

[](#3-load-configuration)

To configure the plugin, you must publish the plugin configuration file.

Publish the default configuration file with the following command:

```
php artisan vendor:publish
```

### 4. Set YOUR API KEY

[](#4-set-your-api-key)

[Log in to ConfigCat Management Console](https://configcat.com/Account/Login) and go to your *Project* to get your *API Key*: [![API-KEY](https://raw.githubusercontent.com/ConfigCat/php-sdk/master/media/readme01.png "API-KEY")](https://raw.githubusercontent.com/ConfigCat/php-sdk/master/media/readme01.png)

Paste YOUR API KEY into the `.env` file

```
# .env
# ...
CONFIGCAT_API_KEY=#YOUR-API-KEY#
CONFIGCAT_AUTH_CLASS="\Auth"        # optional, uses default Auth facade
CONFIGCAT_AUTH_METHOD="user"        # optional, uses default user method
CONFIGCAT_USER_IDENTIFIER="id"      # optional, uses default User id
CONFIGCAT_USER_METHOD="toArray"     # optional, uses default toArray method
CONFIGCAT_CACHE_REFRESH_INTERVAL=60 # optional, defaults to 60 seconds
CONFIGCAT_REQUEST_TIMEOUT=30        # optional, defaults to 30 seconds
CONFIGCAT_CONNECT_TIMEOUT=10        # optional, defaults to 10 seconds
```

### 5. Get your setting value:

[](#5-get-your-setting-value)

Using this, you will be able to get different setting values for different users in your application.
Percentage and targeted rollouts are calculated by the user object identified by Laravel's Auth class.
It uses Session ID as a fallback if there is no authenticated user

Read more about [Targeting here](https://docs.configcat.com/docs/advanced/targeting/).

```
$isMyAwesomeFeatureEnabled = \ConfigCat::getValue("isMyAwesomeFeatureEnabled");
if(is_bool($isMyAwesomeFeatureEnabled) && $isMyAwesomeFeatureEnabled) {
    doTheNewThing();
} else {
    doTheOldThing();
}
```

Support
-------

[](#support)

If you need help how to use this Laravel Plugin for the ConfigCat PHP SDK feel free to to contact the ConfigCat Staff on . We're happy to help.

Contributing
------------

[](#contributing)

Contributions are welcome.

About ConfigCat
---------------

[](#about-configcat)

- [Documentation](https://docs.configcat.com)
- [Blog](https://blog.configcat.com)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

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

2517d ago

### Community

Maintainers

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

---

Tags

feature togglefeature flagconfigcatuser targetingconfigcat laravel

### Embed Badge

![Health badge](/badges/rpdvlpr-configcat-laravel/health.svg)

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

###  Alternatives

[configcat/configcat-client

ConfigCat is a feature flag, feature toggle, and configuration management service. That lets you launch new features and change your software configuration remotely without actually (re)deploying code. ConfigCat even helps you do controlled roll-outs like canary releases and blue-green deployments.

221.1M6](/packages/configcat-configcat-client)[flagception/flagception-bundle

Feature toggle bundle on steroids.

283.8M](/packages/flagception-flagception-bundle)[flagception/flagception

Feature toggle on steroids.

134.3M5](/packages/flagception-flagception)

PHPackages © 2026

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