Installation
composer require avexsoft/filament-donkey
Publish the migration and config:
php artisan vendor:publish --provider="Avexsoft\FilamentDonkey\FilamentDonkeyServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="Avexsoft\FilamentDonkey\FilamentDonkeyServiceProvider" --tag="config"
Run migrations:
php artisan migrate
Register the Plugin
Add to app/Providers/Filament/AdminPanelProvider.php:
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
\Avexsoft\FilamentDonkey\FilamentDonkeyPlugin::make(),
]);
}
First Use Case
app.timezone) for production without touching .env.config('app.timezone') in Tinker or a test route.Dynamic Config Overrides
queue.driver, mail.mailers.smtp.host) without redeploying.// Via FilamentDonkey UI:
// Key: `queue.default`, Value: `sync`
Environment-Specific Toggles
production only).FilamentDonkey facade to fetch values programmatically:
$value = \FilamentDonkey::get('app.debug', false); // Returns false if not set
Integration with Filament Forms
use Avexsoft\FilamentDonkey\Facades\FilamentDonkey;
public static function form(Form $form): Form
{
return $form->schema([
TextInput::make('timezone')
->default(FilamentDonkey::get('app.timezone', 'UTC')),
]);
}
Scheduled Config Updates
* * * * * cd /path-to-project && php artisan filament-donkey:update --key="services.api.key" --value="new-value"
donkey.cache.driver) to avoid collisions.php artisan filament-donkey:export --path="config_backup.json"
TextInput::make('queue.driver')
->options(['sync', 'database', 'redis'])
->required(),
Cache Invalidation
php artisan config:clear
php artisan view:clear
FilamentDonkey::flushCache() in a post-update event.Environment Filtering
environment: null in the UI to bypass filtering.Database Bloat
php artisan filament-donkey:prune --older-than="30 days"
Permission Issues
filament-donkey.update permission in your Filament policy.php artisan tinker
>>> \Avexsoft\FilamentDonkey\Models\Config::all()->toArray();
config/filament-donkey.php:
'debug' => env('FILAMENT_DONKEY_DEBUG', false),
Then check storage/logs/laravel.log for update events.Custom Storage Override the default Eloquent model:
// config/filament-donkey.php
'model' => \App\Models\CustomDonkeyConfig::class,
Ensure CustomDonkeyConfig extends \Avexsoft\FilamentDonkey\Models\Config.
Webhook Triggers Dispatch events on config updates:
// app/Providers/EventServiceProvider.php
public function boot()
{
\Avexsoft\FilamentDonkey\Events\ConfigUpdated::dispatch(
$configKey, $oldValue, $newValue
);
}
API Access Expose configs via a custom API route:
Route::get('/api/config/{key}', function ($key) {
return \FilamentDonkey::get($key);
});
How can I help you explore Laravel packages today?