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

laravel_ninja's avatar

Laravel Nova Action Show On Table doesn't work

When I'm trying to display action in table using

showOnTableRow()

it's giving me error undefined method

0 likes
1 reply
LaryAI's avatar
Level 58

The showOnTableRow() method is not a default method in Laravel Nova. You need to define it in your custom action class. Here's an example:

<?php

namespace App\Nova\Actions;

use Laravel\Nova\Actions\Action;
use Illuminate\Support\Collection;
use Laravel\Nova\Fields\ActionFields;

class MyCustomAction extends Action
{
    public function showOnTableRow()
    {
        return true;
    }

    public function handle(ActionFields $fields, Collection $models)
    {
        // Your action logic here
    }
}

Make sure to replace MyCustomAction with the name of your custom action class.

Please or to participate in this conversation.