artisanpack-ui/core
Unifies configuration for all ArtisanPack UI packages into one config/artisanpack.php file. Publish a base config and use artisanpack:scaffold-config to auto-detect and merge settings while preserving customizations, with an optional --force override for keys.
The ArtisanPack UI Core package provides the foundational functionality for the ArtisanPack UI ecosystem. Its primary purpose is to unify all configuration files from multiple ArtisanPack UI packages into a single, centralized artisanpack.php configuration file. This approach eliminates configuration sprawl and provides a single source of truth for all your ArtisanPack UI package settings.
config/artisanpack.php fileartisanpack:scaffold-config command to automatically detect and merge configurations from all installed ArtisanPack UI packagesYou can install the ArtisanPack UI Core package by running the following composer command:
composer require artisanpack-ui/core
The package will automatically register its service provider in Laravel applications.
To publish the base configuration file to your Laravel application:
php artisan vendor:publish --tag=artisanpack-config
This creates a config/artisanpack.php file where all your ArtisanPack UI package configurations will be centralized.
The core package provides a powerful command to automatically scaffold your configuration file with settings from all installed ArtisanPack UI packages:
php artisan artisanpack:scaffold-config
Options:
--force: Overwrite existing configuration keys (by default, existing keys are preserved)You can also manually configure individual packages in your config/artisanpack.php file:
<?php
return [
'cms-framework' => [
'settings' => [
'site_title' => 'My Awesome Site',
'theme' => 'modern',
],
],
'visual-editor' => [
'autosave_interval' => 300,
'toolbar_style' => 'minimal',
],
'ui-components' => [
'default_theme' => 'dark',
'enable_animations' => true,
],
];
The CoreServiceProvider automatically:
use ArtisanPackUI\Core\Facades\Core;
// Access core functionality through the facade
$core = Core::getInstance();
Access your unified configurations using Laravel's standard config helper:
// Get a specific package's configuration
$cmsSettings = config('artisanpack.cms-framework');
// Get a specific setting with a default value
$siteTitle = config('artisanpack.cms-framework.settings.site_title', 'Default Title');
// Get all ArtisanPack configurations
$allConfigs = config('artisanpack');
artisanpack:scaffold-config command automatically detects all tagged configuration filesconfig/artisanpack.php file, with each package getting its own section--force flag# Install core package
composer require artisanpack-ui/core
# Install other ArtisanPack UI packages
composer require artisanpack-ui/cms-framework
composer require artisanpack-ui/visual-editor
# Publish the base configuration
php artisan vendor:publish --tag=artisanpack-config
# Automatically scaffold configurations from all packages
php artisan artisanpack:scaffold-config
# Your config/artisanpack.php now contains unified settings for all packages
| Package Version | PHP | Laravel Versions Supported |
|---|---|---|
| 1.0.x | 8.2+ | 10.x, 11.x, 12.x |
| 1.1.x | 8.2+ | 11.x, 12.x |
| 1.2.x | 8.2+ | 11.x, 12.x, 13.x |
Note: Laravel 13 requires PHP 8.3+. PHP 8.2 users continue to receive Laravel 11/12; Laravel 13 is only selectable on PHP 8.3+, as enforced by Laravel's own PHP constraint.
Note: Version 1.1 dropped support for Laravel 10.x and earlier. See UPGRADE.md for migration instructions if upgrading from 1.0.x.
As an open source project, this package is open to contributions from anyone. Please read through the contributing guidelines to learn more about how you can contribute to this project.
This package is open-sourced software licensed under the MIT license.
How can I help you explore Laravel packages today?