Download the PHP package bleuren/laravel-settings without Composer

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

Laravel Settings

一個現代化、高性能的 Laravel 設定管理套件

透過資料庫存儲應用設定,支援智能緩存、自定義模型和依賴注入


✨ 功能特點

📋 系統需求

🚀 安裝

透過 Composer 安裝套件:

發布並執行遷移:

(可選)發布配置文件:

📖 基本使用

Facade 方式(推薦)

輔助函數

依賴注入方式

🎨 自定義模型

創建自定義設定模型

配置自定義模型

使用自定義模型

📚 API 參考

SettingRepository Contract

方法 描述 返回類型
get(string $key, mixed $default = null) 獲取設定值 mixed
set(string $key, mixed $value, ?string $description = null) 設置設定值 Model
setMany(array $settings, ?string $description = null) 批量設置設定 Collection
has(string $key) 檢查設定是否存在 bool
remove(string $key) 刪除設定 bool
all() 獲取所有設定 Collection
search(string $pattern) 搜索設定(支援 SQL LIKE) Collection
clearMemoryCache() 清除記憶體緩存 void
cacheKey(string $key) 獲取緩存鍵名 string
getModel() 獲取模型實例 Model

HasSettings Trait 方法

Trait 方法 靜態別名 描述
getSetting($key, $default) get() 獲取設定值
setSetting($key, $value, $desc) set() 設置設定值
setManySettings($settings, $desc) setMany() 批量設置
hasSetting($key) has() 檢查設定存在
removeSetting($key) remove() 刪除設定
getAllSettings() all() 獲取所有設定
searchSettings($pattern) search() 搜索設定

⚙️ 配置選項

🚀 高級功能

預載入設定

提升應用啟動性能,預載入常用設定:

緩存管理

批量操作最佳實踐

搜索和過濾

🏗️ 架構設計

設計模式

緩存策略

  1. Laravel 緩存 - 使用 Cache::rememberForever() 永久緩存
  2. 記憶化緩存 - 請求期間的記憶體緩存
  3. 模型隔離 - 不同模型使用獨立緩存空間
  4. 智能失效 - 資料更新時自動清除相關緩存

依賴注入

🧪 測試

執行完整測試套件:

測試覆蓋範圍

🔧 遷移指南

從其他設定套件遷移

如果您正在使用其他設定套件,可以輕鬆遷移:

資料庫結構

預設的設定表結構:

📄 授權

本套件基於 MIT 授權條款 開源。


All versions of laravel-settings with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^11.0|^12.0
illuminate/database Version ^11.0|^12.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 bleuren/laravel-settings contains the following files

Loading the files please wait ....