PHP code example of nicko170 / laracash-nova-field

1. Go to this page and download the library: Download nicko170/laracash-nova-field 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/ */

    

nicko170 / laracash-nova-field example snippets




namespace App\Nova;

use Nicko170\LaracashNovaField\LaracashNovaField;

class Invoice extends Resource
{
    public function fields(Request $request): array
    {
        return [
            ID::make(__('id'), 'id')->sortable()->readonly(true),
            Text::make(__('Invoice'), 'number')->sortable()->readonly(true),
            LaracashNovaField::make(__('Total'), 'total'),
            LaracashNovaField::make(__('Due'), 'amount_due')
        ];
    }
}