Coder Social home page Coder Social logo

nova-github-cards's Introduction

Logo Nova Github Cards by The3LabsTeam

Latest Version on Packagist Fix PHP code style issues PHPStan Maintainability License Mit Total Downloads

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

Demo Nova Github Cards by The3LabsTeam

Installation

You can install the package via composer:

composer require the-3labs-team/nova-github-cards

You can publish the config file with:

php artisan vendor:publish

and choose: The3LabsTeam\NovaGithubCards\NovaGithubCardsServiceProvider.

This is the contents of the published config file:

<?php

return [
    'vendor' => '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, 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:

use \The3LabsTeam\NovaGithubCards\LatestCommitsTable;
use \The3LabsTeam\NovaGithubCards\LatestIssuesTable;
...

(new LatestCommitsTable()
(new LatestIssuesTable()

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

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)')
 )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.