Downloads
Stars
Version
This tile can be used on the Laravel Dashboard to display a random Chuck Norris joke from the internet Chuck Norris database.
You can install the package via composer:
composer require ingoldsby/laravel-dashboard-chuck-norris-joke-tile
In the dashboard
config file, you must add this configuration in the tiles
key.
// in config/dashboard.php
return [
// ...
'tiles' => [
'chuck_norris_joke' => [
'refresh_interval_in_seconds' => 900, // this will refresh every 15 minutes
]
],
];
In app\Console\Kernel.php
you should schedule the \Ingoldsby\ChuckNorrisJokeTile\Commands\FetchChuckNorrisJokeCommand
to run. You can decide the frequency of running the command. There are approximately 600 jokes available through the API.
// in app/console/Kernel.php
protected function schedule(Schedule $schedule)
{
// ...
$schedule->command(\Ingoldsby\ChuckNorrisJokeTile\Commands\FetchChuckNorrisJokeCommand::class)->everyFifteenMinutes();
}
In your dashboard view you can use the tile:
livewire:chuck-norris-joke-tile
<x-dashboard>
<livewire:chuck-norris-joke-tile position="a1" />
</x-dashboard>
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email instead of using the issue tracker.
I have learnt a lot from Spatie's various packages, including Mailcoach, and would recommend you check them out if you want to know more.
Learn how to create a package like theirs, by watching Spatie's premium video course:
Spatie invest a lot of resources into creating best in class open source packages. You can support them by buying one of their paid products.
The MIT License (MIT). Please see License File for more information.