techenby / laravel-dashboard-github-tile
A tile for laravel dashboard for showing GitHub Issues and Pull Requests.
Requires
- php: ^8.0|^7.4
- spatie/laravel-dashboard: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.3
- tightenco/duster: ^0.3.2
README
A friendly explanation of what your tile does.
This tile can be used on the Laravel Dashboard.
Installation
You can install the package via composer:
composer require techenby/laravel-dashboard-github-tile
Get a Personal API Token from GitHub and add it to your .env
file.
GITHUB_KEY=XXX
In the dashboard config file, you must add this configuration in the tiles
key. The repos
should contain any repo that you want to disply.
// in config/dashboard.php return [ // ... 'tiles' => [ 'github' => [ 'repos' => [ 'techenby/laravel-dashboard-github-tile', 'techenby/radnight', ], 'key' => env('GITHUB_KEY'), 'username' => 'techenby', // use your GitHub Username ], ], ];
In app\Console\Kernel.php you should schedule the Solitweb\WeatherForecastTile\FetchDataFromApiCommand to run however frequently you feel is necessary.
// in app/console/Kernel.php protected function schedule(Schedule $schedule) { // ... $schedule->command(Techenby\GithubTile\FetchDataFromApiCommand::class)->daily(); }
Usage
In your dashboard view you use the livewire:github-tile
component.
<x-dashboard> <livewire:github-tile position="e1" /> </x-dashboard>
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email hi@andymnewhouse.me instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.