<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
daniel-de-wit / nova-single-record-resource example snippets
namespace App\Nova;
use DanielDeWit\NovaSingleRecordResource\Contracts\SingleRecordResourceInterface;
use DanielDeWit\NovaSingleRecordResource\Traits\SupportSingleRecordNavigationLinks;
use Laravel\Nova\Resource as NovaResource;
abstract class Resource extends NovaResource implements SingleRecordResourceInterface
{
use SupportSingleRecordNavigationLinks;
...
}
class MyResource extends Resource
{
public static function singleRecord(): bool
{
return true;
}
}
class MyResource extends Resource
{
/**
* @return string|int
*/
public static function singleRecordId()
{
return 1;
}
}