wamesk/laravel-nova-country

Laravel Nova 5 Country field.

Installs: 445

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/wamesk/laravel-nova-country

5.0.3 2025-02-20 15:43 UTC

This package is auto-updated.

Last update: 2025-10-06 08:42:55 UTC


README

Requirements

  • laravel/nova: ^5.0

Installation

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

Usage

Select::make(__('customer.field.country'), 'country_id')
    ->help(__('customer.field.country.help'))
    ->options(fn () => resolve(CountryService::class)->getListForSelect())
    ->searchable()
    ->required()
    ->rules('required')
    ->onlyOnForms(),
                        
BelongsTo::make(__('customer.field.country'), 'country', Country::class)
    ->displayUsing(fn () => resolve(CountryService::class)->displayUsing($request, $this))
    ->sortable()
    ->filterable()
    ->showOnPreview()
    ->exceptOnForms(),