PHP code example of michaeld555 / filament-fields

1. Go to this page and download the library: Download michaeld555/filament-fields 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/ */

    

michaeld555 / filament-fields example snippets


    use Michaeld555\MoneyInput;

    MoneyInput::make('value')
    ->prefix('R$')

    use Michaeld555\CepInput;

    Cep::make('postal_code')
    ->viaCep(
        mode: 'suffix', // Determines whether the action should be appended to (suffix) or prepended to (prefix) the cep field, or not t input, and the value is the ViaCep attribute that corresponds to it.
         * More information: https://viacep.com.br/
         */
        setFields: [
            'street' => 'logradouro',
            'number' => 'numero',
            'complement' => 'complemento',
            'district' => 'bairro',
            'city' => 'localidade',
            'state' => 'uf'
        ],
        citiesTable: 'cities', // if you want to set a field with information from your cities table in the database
        ibgeColumn: 'igbe_code',  // the name of your column in the cities database that receives the IBGE code
    ),