baks-dev/reference-color
Библиотека справочника цветов для проектов BaksDev: подключение через Composer, сервис ReferenceChoiceColor для вывода цветов в выпадающих списках (tag baks.reference.choice). Требует PHP 8.4+. Лицензия MIT.
ContainerConfigurator and ReferenceChoiceColor suggests it’s optimized for Symfony ecosystems (e.g., Symfony forms, admin panels). For Laravel, this may introduce unnecessary complexity unless the use case aligns with Symfony-like workflows (e.g., dynamic form fields).@if($darkMode) dark:bg-gray-800 @endif).Str::of()->hex() for conversions).
The package’s value proposition is unclear unless it offers unique features (e.g., database-backed color references, advanced validation).ReferenceChoiceColor not autowiring in Laravel).symfony/dependency-injection separately).baks.reference.choice tag and ContainerConfigurator setup imply Symfony form or admin panel integrations. Laravel’s equivalent (e.g., Livewire, Filament) may not align seamlessly.Color::get('primary')).красный for "red"), which could complicate internationalization.getShade('blue', 200))?bg-[color-code]).composer require baks-dev/reference-color.config/colors.php array).ReferenceChoiceColor into a single feature (e.g., an admin color picker).AppServiceProvider).ColorService wrapper to abstract package-specific logic.vendor/package/ColorService).ContainerConfigurator, which Laravel’s container may not handle identically.bind() or extend() to register the service.// AppServiceProvider.php
public function register()
{
$this->app->bind(ReferenceChoiceColor::class, function ($app) {
return new ReferenceChoiceColor();
});
}
baks.reference.choice), create a Laravel-compatible alternative.Cache::remember).$colors = Cache::remember('color.palette', now()->addHours(1), function () {
return ReferenceChoiceColor::getAll();
});
AppServiceProvider.bg-{color}).How can I help you explore Laravel packages today?