marshmallow/nova-fields-size

This Nova field type will show bites in MB, GB or whatever you need it to.

v2.0.0 2020-12-06 16:33 UTC

This package is auto-updated.

Last update: 2024-04-05 09:28:54 UTC


README

alt text

Laravel Nova Field to display sizes

Installatie

composer require marshmallow/nova-fields-size

Usage

// In short:
Size::make('Column')
		->sortable(),


/**
 * Extended
 */
Size::make('Database Size')

	/**
	 * Options: ['bytes', 'Kb', 'Mb', 'Gb']
	 * Default: bytes
	 */
	->isStoredAs('bytes')		//

	/**
	 * Options: ['bytes', 'Kb', 'Mb', 'Gb', 'Auto']
	 * Default: Auto
	 */
	->displayAs('Auto')

	/**
	 * Default: 2
	 */
	->precision(2),