Add a touch of fun and lightweight Filament PHP widget that brings "Dad Jokes" humor directly to your dashboard and make your Filament Dashboard tell a joke. This plugin is designed to add a bit of humor to the administrative experience by displaying jokes tailored to your application's language settings.
- Automatic Localization:
- Bahasa Indonesia: Displays a collection of iconic local "bapak-bapak" jokes. Collected from Candaan API Repository by Ardhi Putra
- English: Dynamically fetches fresh dad jokes from the
icanhazdadjoke.comAPI.
- Interactive Refresh: Includes a button to instantly swap jokes without reloading the page using Livewire.
- Filament V4 and V5 Ready: Optimized to run seamlessly on the latest version of Filament.
You can install the package via Composer:
composer require salmanalmajali/jokes-widget(Optional) Publish the translation files if you wish to customize the widget text:
php artisan vendor:publish --tag="jokes-widget-translations"Register the plugin in your Filament Panel Provider (typically AdminPanelProvider.php):
use SalmanAlmajali\JokesWidget\JokesWidget;
public function panel(Panel $panel): Panel
{
return $panel
->widgets([
JokesWidget::class,
]);
}The widget automatically detects your application's locale:
- If the locale is set to id, the widget uses the local joke collection.

- or any other locale (default en), the widget fetches data from the external API.

Run the package tests using Pest:
composer testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security-related issues, please email undermod007@gmail.com instead of using the issue tracker.