https://github.com/the-3labs-team/nova-github-cards
Nova Github Cards metrics for Laravel Nova
https://github.com/the-3labs-team/nova-github-cards
cards github laravel metrics nova
Last synced: about 1 month ago
JSON representation
Nova Github Cards metrics for Laravel Nova
- Host: GitHub
- URL: https://github.com/the-3labs-team/nova-github-cards
- Owner: The-3Labs-Team
- License: mit
- Created: 2023-08-03T09:29:21.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-29T21:00:05.000Z (over 2 years ago)
- Last Synced: 2025-01-31T08:43:26.575Z (over 1 year ago)
- Topics: cards, github, laravel, metrics, nova
- Language: PHP
- Homepage: https://3labs.it
- Size: 391 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://packagist.org/packages/the-3labs-team/nova-github-cards)
[](https://github.com/The-3Labs-Team/nova-github-cards/actions/workflows/lint.yml)
[](https://github.com/The-3Labs-Team/nova-github-cards/actions/workflows/analyse.yml)
[](https://codeclimate.com/github/The-3Labs-Team/nova-github-cards/maintainability)

[](https://packagist.org/packages/the-3labs-team/nova-github-cards)
# Nova Github Cards
Enhance your Laravel Nova experience by seamlessly integrating GitHub project cards into your dashboard. This powerful
package allows you to effortlessly display essential GitHub statistics, issues, commits, and other project information
directly within your Nova dashboard.
## Demo

## Installation
You can install the package via composer:
```bash
composer require the-3labs-team/nova-github-cards
```
You can publish the config file with:
```bash
php artisan vendor:publish
```
and choose: `The3LabsTeam\NovaGithubCards\NovaGithubCardsServiceProvider`.
This is the contents of the published config file:
```php
'YOUR-VENDOR',
'repository' => 'YOUR-REPO-NAME',
'branch' => 'main',
'per_page' => 5,
'cache_ttl' => 0, //in seconds
'icons' => [
'error' => [
'icon' => 'x-circle',
'iconClass' => 'text-red-500',
],
'success' => [
'icon' => 'check-circle',
'iconClass' => 'text-green-500',
],
],
];
```
**Note:** this package uses [Laravel GitHub](GrahamCampbell\GitHub\GitHubServiceProvider), so you need to configure it
in your `config/github.php` file.
## Usage
Add your cards to your dashboard in the `cards` method, for example in `Dashboard\Main`:
```php
use \The3LabsTeam\NovaGithubCards\LatestCommitsTable;
use \The3LabsTeam\NovaGithubCards\LatestIssuesTable;
...
(new LatestCommitsTable()
(new LatestIssuesTable()
```
You can also override the config for each card, as follows:
```php
use \The3LabsTeam\NovaGithubCards\LatestCommitsTable;
...
(new LatestCommitsTable(
name: 'The name of the card (string)',
vendor: 'The name of your vendor (string)',
repository: 'The name of your repo (string)',
branch: 'The name of your branch (string)',
perPage: 'Total of results (int)',
cache: 'The cache in seconds (int)')
)
```
## Sponsor