Best laravel framework open-source packages.

Nova storage info card

Laravel Nova card, that helps you to control your S3 type disks.
Updated 2 years ago

nova-storage-info-card

Latest Stable Version Total Downloads License composer.lock

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

alt text

Installation

You can install the package into a Laravel app that uses Nova via composer:

composer require qubeek/nova-storage-info-card

Translation

If you want to override localization, you can publish lang files using that command:

php artisan vendor:publish --provider="Qubeek\NovaStorageInfoCard\CardServiceProvider"

Usage

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
    ];
}

License

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