Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gignux's avatar

Nova resource index

I have some problem with nova resource. I create a Commissioni resource and model is:

    protected $connection = 'inote';
    protected $table = "inote_commissioni";
    protected $primaryKey = 'UID';

in my resource

public static $title = 'UID';

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

    /**
     * Get the fields displayed by the resource.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function fields(Request $request)
    {
        return [
            ID::make()->sortable(),

        ];
    }

when i open nova resource index have column id but with '-' value

0 likes
1 reply
bugsysha's avatar

Have you tried?

ID::make('ID', 'uuid')->sortable(),

Or maybe just

ID::make('Uuid')->sortable(),

Please or to participate in this conversation.