Download the PHP package tarfin-labs/laravel-config without Composer

On this page you can find all versions of the php package tarfin-labs/laravel-config. 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-config

Laravel Config Logo

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Introduction

Laravel Config provides a database-backed configuration management system for your Laravel application. Store, retrieve, and manage configuration parameters with automatic type casting, tagging support, and nested namespaces.

Key Features:

Version Compatibility

v6.x (Latest)

Requirement Versions
PHP 8.1, 8.2, 8.3, 8.4, 8.5
Laravel 10, 11, 12
PHPUnit 10, 11, 12

v5.x (Maintenance)

Requirement Versions
PHP 8.1, 8.2, 8.3, 8.4, 8.5
Laravel 10, 11, 12
PHPUnit 9.5, 10, 11, 12

Installation

Install the package via Composer:

Publish the configuration and migration files:

Run the migrations:

Quick Start

Usage

Using the Facade

Creating Config Parameters

Use ConfigFactory to build configuration items:

Supported Data Types

The ConfigDataType enum provides the following types with automatic casting:

Type Storage Retrieved As
BOOLEAN '1' or '0' true or false
INTEGER '123' 123
DATE '2024-12-25' Carbon instance
DATE_TIME '2024-12-25 14:30' Carbon instance
JSON JSON string Array

Custom Casters:

You can use Laravel's custom cast classes:

Working with Tags

Organize configs with tags and retrieve them by tag:

Nested Parameters

Group related configs using dot notation and retrieve them by namespace:

Updating and Deleting

Helper Functions

All facade methods are available as helper functions:

Database Schema

The package creates a laravel_config table with the following structure:

Column Type Description
id bigint Primary key
name varchar (unique) Configuration parameter name
type varchar Data type (default: 'boolean')
val varchar (nullable) Configuration value
description text (nullable) Human-readable description
tags json (nullable) Array of tags for organization
created_at timestamp Creation timestamp
updated_at timestamp Last update timestamp

Configuration

Publish the config file to customize the table name:

In config/laravel-config.php:

Upgrading

From v5.x to v6.x

Breaking Changes:

  1. Class Renamed: LaravelConfig class is now ConfigManager
  2. Facade Moved: LaravelConfigFacade is now Facades\LaravelConfig
  3. Version Support: PHP 8.0 and Laravel 8-9 are no longer supported

Migration Guide:

If you were directly instantiating the class:

If you were importing the facade directly:

No changes required if you:

Testing

Changelog

Please see CHANGELOG for more information about recent changes.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Credits

License

Laravel Config is open-sourced software licensed under the MIT license.


All versions of laravel-config with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
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 tarfin-labs/laravel-config contains the following files

Loading the files please wait ...