Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 1.26 KB

File metadata and controls

71 lines (47 loc) · 1.26 KB

Tailwind UI metrics in Larvel Nova style

WARNING: This package is under development.

You can publish the config file with:

php artisan vendor:publish --provider="Salfade\Metric\MetricServiceProvider" --tag="config"

This is the contents of the published config file:

return [
];

Usage

php artisan metric:value UserCount


namespace App\Metrics;

use App\User;
use Salfade\Metric\Metrics\Value;

class UserCount extends Value
{
    public $title = 'Total Users';
    public $icon = 'Users';

    public function url():string
    {
        return route('user.index');
    }

    public function value()
    {
        //@TODO return the value for the value metric
        return User::count();
    }
}

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 admin@salfade.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.