klepak/nova-router-link

Adds a field that generates a link using the Nova Router

v1.0 2019-11-02 16:33 UTC

This package is auto-updated.

Last update: 2024-10-27 19:40:08 UTC


README

Adds a field that generates a link using the Nova Router

Installation

composer require klepak/nova-router-link

Usage

use Klepak\NovaRouterLink\RouterLink;

RouterLink::make(__('Process Details'), 'process_id')
    ->route('process-details', [
        'processId' => $this->process_id
    ]);
use Klepak\NovaRouterLink\RouterLink;
use Suenerds\NovaSearchableBelongsToFilter\NovaSearchableBelongsToFilter;
use App\Nova\Process;

$filters = base64_encode(json_encode([
    ['class' => NovaSearchableBelongsToFilter::class . '\\Process',
        'value' => [
            'display' => $this->title,
            'value' => $this->id,
        ]
    ]
]));

RouterLink::make(__('Process Filter'), 'process_id')
    ->route('index', ['resourceName' => Process::uriKey()], ['processes_filter' => $filters]),

Screenshots
index details