wamesk/laravel-nova-unit

Laravel Nova 4 Units.

dev-main 2023-11-14 10:35 UTC

This package is auto-updated.

Last update: 2024-05-14 11:38:19 UTC


README

Requirements

  • laravel/nova: ^4.0

Installation

composer require wamesk/laravel-nova-unit
php artisan vendor:publish --provider="Wame\LaravelNovaUnit\PackageServiceProvider"
php artisan migrate
php artisan db:seed --class=UnitSeeder

Add Policy to ./app/Providers/AuthServiceProvider.php

protected $policies = [
    'App\Models\Unit' => 'App\Policies\UnitPolicy',
];

Usage

Select::make(__('product.field.unit'), 'unit_id')
    ->help(__('product.field.unit.help'))
    ->options(UnitController::selectOptions())