Download the PHP package litepie/settings without Composer

On this page you can find all versions of the php package litepie/settings. 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 settings

Litepie Settings Package

A comprehensive, enterprise-grade multi-level settings management package for Laravel applications. This package provides a robust and flexible solution for managing application, user, company, and global settings with advanced features like encryption, caching, audit trails, and permissions.

โœ… Laravel 12 Ready

This package is fully compatible with Laravel 12 and includes:

Requirements

โœจ Features

Core Features

Advanced Features

๐Ÿ“ฆ Installation

Step 1: Install via Composer

Step 2: Install and Setup

Step 3: Configure (Optional)

The package works out of the box, but you can customize behavior by publishing the config:

๐ŸŽจ Frontend UI Components

Ready-to-use UI components for managing settings in your frontend applications:

๐Ÿ“‹ UI Components Documentation - Complete frontend implementation guide

Available for multiple frameworks:

Features include real-time search, group filtering, validation, import/export, and responsive design across all platforms.

๐Ÿš€ Quick Start

Using the Facade

Using the Helper Function

Using the HasSettings Trait

Add the HasSettings trait to any Eloquent model:

๐Ÿ”ง Advanced Usage

Setting Types and Validation

The package supports 8 built-in data types with automatic casting:

Groups and Organization

Organize settings into logical groups for better management:

Bulk Operations

Efficiently handle multiple settings:

Setting Dependencies

Create settings that depend on other settings:

Caching Control

The package automatically caches settings, but you can control caching behavior:

๐ŸŒ RESTful API

The package provides a complete REST API for managing settings:

API Endpoints

API Usage Examples

API Configuration

Customize API behavior in config:

โšก Artisan Commands

The package includes powerful CLI commands for managing settings:

Installation and Setup

Import/Export Operations

Cache Management

Command Options

Command Option Description
export --file Output file path (default: settings.json)
export --owner-type Class name of owner model
export --owner-id ID of owner instance
export --groups Array of group keys to export
import --overwrite Overwrite existing settings
import --owner-type Import for specific owner type
import --owner-id Import for specific owner ID

โš™๏ธ Configuration

Complete Configuration Reference

Publish the config file for full customization:

Key Configuration Options

Environment Variables

๐Ÿ“Š Events and Audit Trail

Available Events

The package dispatches events for all setting operations:

Event Usage Examples

Audit Trail and History

The package automatically tracks all changes when audit is enabled:

Audit Configuration

๐Ÿ” Security and Permissions

Encrypted Settings

Sensitive data is automatically encrypted/decrypted:

Permission System

The package includes a comprehensive permission system:

Public vs Private Settings

Control setting visibility:

Data Validation

Add validation rules to ensure data integrity:

๐Ÿ’ก Real-World Examples

Multi-tenant Application

E-commerce Configuration

SaaS Application Settings

๐Ÿ—๏ธ Architecture and Best Practices

Setting Hierarchy

The package follows a clear hierarchy for setting resolution:

  1. User-specific settings (highest priority)
  2. Role-specific settings
  3. Team/Group settings
  4. Company/Organization settings
  5. Global settings (lowest priority)

Performance Optimization

Naming Conventions

Error Handling

๐Ÿ”ง Custom Setting Types

Creating Custom Types

You can create custom setting types for specialized data:

Register the custom type in config:

Use the custom type:

๐Ÿšจ Troubleshooting

Common Issues

Cache Not Clearing

Settings Not Persisting

Performance Issues

Permission Denied

Debug Mode

Enable debug logging in config:

This will log all setting operations for troubleshooting.

๐Ÿ“š API Reference

Settings Service Methods

Method Parameters Return Description
get() $key, $default, $owner mixed Get setting value
set() $key, $value, $owner, $options bool Set setting value
has() $key, $owner bool Check if setting exists
forget() $key, $owner bool Delete setting
all() $owner Collection Get all settings
getByGroup() $groupKey, $owner Collection Get settings by group
setMultiple() $settings, $owner bool Set multiple settings
getMultiple() $keys, $owner array Get multiple settings
export() $owner, $groups array Export settings
import() $settings, $owner, $overwrite bool Import settings
clearCache() $key, $owner void Clear cache

HasSettings Trait Methods

Method Parameters Return Description
getSetting() $key, $default mixed Get setting for model
setSetting() $key, $value, $options bool Set setting for model
hasSetting() $key bool Check if model has setting
forgetSetting() $key bool Delete model setting
getAllSettings() - Collection Get all model settings
getSettingsByGroup() $groupKey Collection Get model settings by group
setMultipleSettings() $settings bool Set multiple model settings

๐Ÿงช Testing

Unit Testing

The package includes comprehensive tests. Run them with:

Testing in Your Application

Mock Settings in Tests

๐Ÿ”„ Migration Guide

From Other Setting Packages

From spatie/laravel-settings

From anlutro/l4-settings

Database Migration

If migrating from another settings package:

๐Ÿค Contributing

We welcome contributions! Please follow these guidelines:

Development Setup

Guidelines

  1. Write Tests: All new features must include tests
  2. Follow PSR Standards: Use PSR-12 code style
  3. Document Changes: Update README and docblocks
  4. BC Compatibility: Don't break existing APIs without major version bump

Pull Request Process

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Update documentation
  7. Commit your changes (git commit -m 'Add amazing feature')
  8. Push to the branch (git push origin feature/amazing-feature)
  9. Open a Pull Request

See CHANGELOG.md for complete history.

๐Ÿ“„ License

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

๐Ÿ™ Credits

๐Ÿ“ž Support

๐ŸŒŸ Show Your Support

If this package helped you, please consider:


Made with โค๏ธ by Renfos Technologies


All versions of settings with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^10.0|^11.0|^12.0
spatie/laravel-permission Version ^6.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 litepie/settings contains the following files

Loading the files please wait ....