Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Core Laravel Package

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.

View on GitHub
Deep Wiki
Context7

ArtisanPack UI Core

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.

Features

  • Unified Configuration Management: Merge all ArtisanPack UI package configurations into a single config/artisanpack.php file
  • Automatic Configuration Scaffolding: Use the artisanpack:scaffold-config command to automatically detect and merge configurations from all installed ArtisanPack UI packages
  • Preservation of Custom Settings: Existing customizations are preserved when scaffolding configurations
  • Laravel Integration: Seamless integration with Laravel's service container and configuration system
  • Force Override Option: Ability to force-update existing configuration keys when needed

Installation

You 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.

Configuration

Publishing the Configuration File

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.

Automatic Configuration Scaffolding

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)

Manual Configuration

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,
    ],
];

Usage

Service Provider Integration

The CoreServiceProvider automatically:

  • Registers the Core singleton service
  • Publishes the configuration file when running in console mode
  • Registers the scaffold configuration command

Using the Core Facade

use ArtisanPackUI\Core\Facades\Core;

// Access core functionality through the facade
$core = Core::getInstance();

Configuration Access

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');

How It Works

  1. Installation: When you install ArtisanPack UI packages, they tag their configuration files for discovery
  2. Detection: The artisanpack:scaffold-config command automatically detects all tagged configuration files
  3. Merging: Configurations are merged into the central config/artisanpack.php file, with each package getting its own section
  4. Preservation: Your existing customizations are preserved unless you use the --force flag
  5. Access: All configurations are accessible through Laravel's standard configuration system

Example Workflow

# 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

Requirements

  • PHP ^8.2
  • Laravel 11.x, 12.x, or 13.x (illuminate/support)

Supported Versions

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.

Contributing

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.

License

This package is open-sourced software licensed under the MIT license.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky