PHP code example of wamesk / laravel-nova-unit

1. Go to this page and download the library: Download wamesk/laravel-nova-unit library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wamesk / laravel-nova-unit example snippets


UnitSelect::make(__('product.field.weight_unit'), 'weight_unit'),

UnitSelect::make(__('product.field.weight_unit'), 'weight_unit')
    ->onlyGroups(UnitWeightEnum::class),

UnitSelect::make(__('product.field.weight_unit'), 'weight_unit')
    ->exceptGroups([
        UnitAreaEnum::class,
        UnitEnergyEnum::class,
        UnitWeightEnum::class,
        ...
    ]),