laravel/nova: ^4.0
composer require wamesk/laravel-nova-country
php artisan migrate
php artisan db:seed --class=LanguageSeeder
php artisan db:seed --class=CurrencySeeder
php artisan db:seed --class=CountrySeeder
Add Policy to ./app/Providers/AuthServiceProvider.php
protected $policies = [
'App\Models\Country' => 'Policies\CountryPolicy',
];
Select::make(__('customer.field.country'), 'country_code')
->help(__('customer.field.country.help'))
->options(fn () => CountryController::getListForSelect())
->searchable()
->required()
->rules('required')
->onlyOnForms(),
BelongsTo::make(__('customer.field.country'), 'country', Country::class)
->displayUsing(fn () => CountryController::displayUsing($request, $this))
->sortable()
->filterable()
->showOnPreview()
->exceptOnForms(),