Download the PHP package offload-project/laravel-hoist without Composer

On this page you can find all versions of the php package offload-project/laravel-hoist. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-hoist

Laravel Hoist

Latest Version on Packagist Tests Build Total Downloads

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

Features

Table of Contents

Requirements

Installation

Configuration

Publish the configuration file:

Edit config/hoist.php:

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

Optionally, publish the stub files for customization:

Quick Start

1. Create a Feature

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

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

Note: The Feature interface is optional but recommended. Features are discovered based on having a resolve() method, but implementing the interface provides better IDE support and type safety.

2. Use Features

3. Filter by Tags

Attributes

PHP attributes provide a clean, declarative way to define feature metadata directly on the class. All attributes are optional and target the class level.

Attribute Parameter Description
#[Label('...')] string $value Human-readable display name
#[Description('...')] string $value Feature description
#[Route('...')] string $value Named route for generating the feature's href
#[Tags('...')] string ...$tags One or more tags for categorization
#[FeatureSet('...')] string $name, ?string $label Group features into a named set

When an attribute is present, it takes precedence over the equivalent class property. You can mix both approaches — for example, use attributes for static metadata and properties for values that need to be computed.

Feature Discovery Service

The FeatureDiscovery service (accessed via the Hoist facade) provides several methods for working with features:

Method Returns
Hoist::discover() Collection of discovered feature class names
Hoist::all() Collection of FeatureData without active status
Hoist::forModel($model) Collection of FeatureData with active status
Hoist::names() Array of all feature names
Hoist::tagged($tag) Features with the given tag
Hoist::withTags([...]) Features with ALL given tags (AND)
Hoist::withAnyTags([...]) Features with ANY of the given tags (OR)
Hoist::taggedFor($tag, $m) Tagged features with active status for $m
Hoist::withTagsFor([...], $m) All-tags features with active status for $m
Hoist::withAnyTagsFor([...], $m) Any-tags features with active status for $m

Feature Data Structure

The FeatureData class provides a structured way to access feature information:

Integration with Laravel Pennant

This package extends Laravel Pennant by providing:

  1. Automatic Discovery — No need to manually register features
  2. PHP Attributes — Declarative metadata using native PHP attributes
  3. Rich Metadata — Add custom metadata to features
  4. Route Integration — Link features to routes automatically
  5. Structured Data — Get features as structured data objects
  6. Bulk Operations — Get all features and their status in one call

Using with Pennant's Native Features

You can still use all of Laravel Pennant's native features:

Use Cases

Building a Feature Dashboard

API Endpoint for Frontend

Returns:

Dynamic Navigation

Advanced Usage

Custom Feature Directories

You can configure multiple feature directories, each mapped to its namespace:

Each directory is mapped to its corresponding namespace, allowing you to organize features across different modules or domains while maintaining proper class resolution.

Feature Organization

Organize features by category:

Route Handling

The href property in FeatureData is generated from the feature's route value (via the #[Route] attribute or $route property). The package safely handles routes:

The Feature Interface

The package provides an optional Feature interface for better type safety. Features are discovered if they either:

  1. Implement the Feature interface, OR
  2. Have a resolve() method (for backward compatibility with plain Pennant features)

Metadata Best Practices

Use metadata for:

AI Coding Assistant Skill

This package ships a Laravel Boost skill so coding assistants (Claude Code, Cursor, etc.) follow the package's conventions when generating code. Install it in your app with:

The skill source lives at skills/SKILL.md.

Testing

Contributing

Contributions are welcome! Please see the documents below before getting started.

Security

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-hoist with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^11.0|^12.0|^13.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package offload-project/laravel-hoist contains the following files

Loading the files please wait ...