mabou7agar/nova-simple-repeatable

A Laravel Nova simple repeatable rows field.

1.0.0 2020-12-18 16:07 UTC

This package is not auto-updated.

Last update: 2021-06-15 08:19:19 UTC


README

Latest Version on Packagist Total Downloads

This Laravel Nova package allows you to create simple horizontal rows of fields that the user can add/remove.

Requirements

  • php: >=7.2
  • laravel/nova: ^3.0

Features

A Laravel Nova simple repeatable rows field.

Screenshots

Form page

Installation

Install the package in to a Laravel app that uses Nova via composer:

composer require optimistdigital/nova-simple-repeatable

Usage

use OptimistDigital\NovaSimpleRepeatable\SimpleRepeatable;

public function fields(Request $request) {
    SimpleRepeatable::make('Users', 'users', [
        Text::make('First name'),
        Text::make('Last name'),
        Email::make('Email'),
      ])
      ->canAddRows(true) // Optional, true by default
      ->canDeleteRows(true), // Optional, true by default
}

Credits

License

Nova Simple Repeatable is open-sourced software licensed under the MIT license.