Skip to content

Commit

Permalink
New readme content
Browse files Browse the repository at this point in the history
  • Loading branch information
murdercode committed Aug 5, 2023
1 parent 38c9874 commit 3d3fb7d
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,27 @@
<img src="https://github.com/the-3labs-team/nova-github-cards/raw/HEAD/art/banner.png" width="100%"
alt="Logo Nova Github Cards by The3LabsTeam"></p>

# 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.

## Installation

You can install the package via composer:

```bash
composer required the-3labs-team/nova-github-cards
```

You can publish the config file with:

```bash
php artisan vendor:publish
```
**and select: `The3LabsTeam\NovaGithubCards\NovaGithubCardsServiceProvider`.**

and choose: `The3LabsTeam\NovaGithubCards\NovaGithubCardsServiceProvider`.

This is the contents of the published config file:

Expand All @@ -42,32 +49,25 @@ return [
];
```

You can publish the GitHub config file with:
```bash
php artisan vendor:publish
```
**and select: `GrahamCampbell\GitHub\GitHubServiceProvider`.**

In this file you can set the options for the GitHub client.
You can choose from several options:
- Main
- App
- Jwt
- Private

**The config file is documented, so choose the option that best suits your needs.**
**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(name: 'The name of the card'))
(new LatestIssuesTable(name: 'The name of the card'))
(new LatestCommitsTable()
(new LatestIssuesTable()

```
You can also override the config files like this:

You can also override the config for each card, as follows:

```php
use \The3LabsTeam\NovaGithubCards\LatestCommitsTable;
...
Expand All @@ -81,4 +81,3 @@ use \The3LabsTeam\NovaGithubCards\LatestCommitsTable;
cache: 'The cache in seconds (int)')
)
```

0 comments on commit 3d3fb7d

Please sign in to comment.