laravel-nova-fields / gender
A Laravel Nova gender field.
Installs: 5 281
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2024-10-06 10:03:33 UTC
README
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).