Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages

Installation Instructions

composer require laravel-nova-fields/gender

Readme

A simple gender field for Laravel Nova apps

This package contains a very simple Laravel Nova gender field. It is basically an extended select field, like the native country or timezone fields.

Installation

You can install this package in to a Laravel app that uses Nova via composer:

composer require laravel-nova-fields/gender

To publish the config file to config/laravel-nova-fields-gender.php run:

php artisan vendor:publish --provider="LaravelNovaFields\Gender\FieldServiceProvider"

The contents of this configuration can be modified to modify the various default and extended genders.

Usage

You can use the LaravelNovaFields\Gender\Gender field in your Nova resource:

namespace App\Nova;

use LaravelNovaFields\Gender\Gender;

// ...

class Person extends Resource
{
    // ...

    public function fields(Request $request)
    {
        return [
            // ...

            Gender::make('Gender')
                ->includeExtended(), // includes extended gender set

            // ...
        ];
    }
}

License

The MIT License (MIT).

Back to Top
Added 7 years ago
Last updated 7 Years Ago
Version v1.1.0
Composer
laravel-nova-fields/gender
GitHub stars 4
Packagist downloads 5,334

Favorites

4 users favorited

Rating

N/A
(out of 5)
★★★★★
★★★★
★★★
★★
0 ratings

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas