yaroslawww/nova-forms-entries

This package is abandoned and no longer maintained. The author suggests using the think.studio/nova-forms-entries package instead.

Nova helper to implement laravel-forms-entries package.

2.3.0 2023-09-10 12:40 UTC

This package is auto-updated.

Last update: 2023-09-10 12:55:08 UTC


README

Packagist License Packagist Version Total Downloads Build Status Code Coverage Scrutinizer Code Quality

Nova helper to implement laravel-forms-entries package.

Nova Package
V1 V1
V4 V2

Installation

Install the package via composer:

composer require think.studio/nova-forms-entries

Usage

use App\Nova\Resource;
use App\Nova\Resources\Staff;
use App\Nova\Resources\Contact;
use NovaFormEntries\FormEntryResource;

class FormEntry extends Resource
{
    use FormEntryResource;

    /**
     * The model the resource corresponds to.
     */
    public static $model = \FormEntries\Models\FormEntry::class;

    /**
     * The single value that should be used to represent the resource when being displayed.
     */
    public static $title = 'name';

    /**
     * The columns that should be searched.
     *
     * @var array
     */
    public static $search = [
        'created_at',
        'type',
        'id',
    ];

    public function senderTypes(): array
    {
        return [
            Contact::class,
            Staff::class,
        ];
    }
}

Credits

  • Think Studio