- How does ArtisanPack UI Core help manage configurations for multiple ArtisanPack packages?
- It consolidates all ArtisanPack UI package configurations into a single `config/artisanpack.php` file, eliminating sprawl. Run `php artisan artisanpack:scaffold-config` to auto-detect and merge settings while preserving your customizations. Use the `--force` flag to override existing keys if needed.
- Does this package work with Laravel 10 or older versions?
- No, ArtisanPack UI Core requires Laravel 11–13 (PHP 8.2+). Laravel 13 specifically needs PHP 8.3+. If you’re on an older version, you’ll need to upgrade or explore alternatives like manual configuration files.
- Can I use this package without installing other ArtisanPack UI components?
- Yes, but its full value comes from managing configurations for multiple ArtisanPack packages. It provides scaffolding, logging utilities, and Blade directives that are useful even standalone, though some features like diagnostics assume an ArtisanPack ecosystem.
- What happens if two ArtisanPack packages define the same config key?
- By default, the `artisanpack:scaffold-config` command preserves existing keys. If you want to force-update a conflicting key, use the `--force` flag. This ensures your custom settings aren’t accidentally overwritten during merges.
- How do I publish the base configuration file for the first time?
- Run `php artisan vendor:publish --tag=artisanpack-config` to generate the `config/artisanpack.php` file. This file will serve as the central hub for all ArtisanPack UI package settings in your Laravel project.
- Are there any performance concerns with centralized configuration management?
- The package adds minimal overhead during Laravel boot. Configuration merging happens once during scaffolding, and the centralized file reduces runtime lookups. For large projects, ensure your `artisanpack.php` remains organized to avoid performance bottlenecks.
- Can I extend or override the ArtisanPackServiceProvider for custom logic?
- Yes, the package provides a base `ArtisanPackServiceProvider` that you can extend in your own service provider. Override methods like `register` or `boot` to inject custom bindings or logic while maintaining compatibility with the ArtisanPack ecosystem.
- How do I test my application with ArtisanPack UI Core?
- Use the `ArtisanPackTestCase` base class for testing. It includes helpers for asserting configuration values, Blade directives, and service container bindings. Extend it in your test classes to leverage these utilities without rewriting common assertions.
- What are the risks of using `--force` with `artisanpack:scaffold-config`?
- The `--force` flag overwrites existing configuration keys, which can accidentally erase your custom settings. Use it sparingly, ideally in development or when you’re certain the new values are correct. Always back up your `artisanpack.php` before running forced updates.
- Are there alternatives to ArtisanPack UI Core for Laravel configuration management?
- For general Laravel configuration, you can use Laravel’s built-in `config/` system or packages like `spatie/laravel-config-array`. However, ArtisanPack UI Core is specialized for managing multiple ArtisanPack packages in unison, offering auto-scaffolding and ecosystem-specific utilities that alternatives lack.