PHPackages                             offload-project/laravel-hoist - 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. offload-project/laravel-hoist

ActiveLibrary

offload-project/laravel-hoist
=============================

Feature discovery and util extension for Laravel Pennant

v1.3.0(1mo ago)4535MITPHPPHP ^8.3CI passing

Since Dec 16Pushed 1mo agoCompare

[ Source](https://github.com/offload-project/laravel-hoist)[ Packagist](https://packagist.org/packages/offload-project/laravel-hoist)[ RSS](/packages/offload-project-laravel-hoist/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (18)Versions (12)Used By (0)

 [![Latest Version on Packagist](https://camo.githubusercontent.com/2d9660e253f557ea800f4243fcf95150a4b4881d41096cf693907ba95027f08e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f66666c6f61642d70726f6a6563742f6c61726176656c2d686f6973742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/offload-project/laravel-hoist) [![GitHub Tests Action Status](https://camo.githubusercontent.com/e2cee919a0616c0d8459254d3b27e0053c99e213775522f11c5b855ece4d6cac/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f66666c6f61642d70726f6a6563742f6c61726176656c2d686f6973742f74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265)](https://github.com/offload-project/laravel-hoist/actions) [![Total Downloads](https://camo.githubusercontent.com/32f25df8a75385f593fa7f6100242ed96eb61bd159aaa9aa470be264a6fb786b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f66666c6f61642d70726f6a6563742f6c61726176656c2d686f6973742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/offload-project/laravel-hoist)

Laravel Hoist
=============

[](#laravel-hoist)

Feature discovery and management extension for Laravel Pennant. Automatically discover, manage, and serve feature flags with custom metadata and routing.

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 11/12/13
- Laravel Pennant 1+

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

[](#installation)

```
composer require offload-project/laravel-hoist
```

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

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=hoist-config
```

Edit `config/hoist.php`:

```
return [
    'feature_directories' => [
        app_path('Features') => 'App\\Features',
    ],
];
```

The configuration uses an associative array where keys are directory paths and values are their corresponding namespaces.

Optionally, publish the stub files for customization:

```
php artisan vendor:publish --tag=hoist-stubs
```

Features
--------

[](#features)

### Feature Discovery

[](#feature-discovery)

Automatically discover and manage Laravel Pennant features with custom metadata and routing information.

#### Create a Feature

[](#create-a-feature)

```
php artisan hoist:feature NewFeature
```

This will create a new feature class in your configured feature directory (default: `app/Features`).

#### Feature Class Example

[](#feature-class-example)

Features can define metadata using **PHP attributes** (recommended) or **class properties**. Attributes take precedence over properties when both are present.

```
