Get basic information about storage usage. Be sure, that you use S3 driver for disks, that you adding to that card
Note, that you need to add the disk to config/filesystem.php
You can install the package into a Laravel app that uses Nova via composer:
composer require qubeek/nova-storage-info-card
If you want to override localization, you can publish lang files using that command:
php artisan vendor:publish --provider="Qubeek\NovaStorageInfoCard\CardServiceProvider"
Register the card with Nova. To use the package, you need to indicate a disk meta in the format:
- the name that you used in config/filesystem.php
- title for a table
- total space of a disk
For example:
class NovaServiceProvider extends NovaApplicationServiceProvider
...
/**
* Get the cards that should be displayed on the default Nova dashboard.
*
* @return array
*/
protected function cards()
{
return [
(new NovaStorageInfoCard())
->addDisk('Основной диск', 's3', '1 TB')
->addDisk('Дополнительный диск', 's3') // Without disk space
->autoplay(false) // Enable autoplaying for slider
->cacheFor(24 * 60 * 60) // Cache for 24 hours
];
}
The MIT License (MIT). Please see License File for more information.