创建自定义编辑按钮Laravel / Rapyd / DataEdit

Using laravel rapyd how can I createa another edit type button just for some of the object attribute

Let`s assume that this will create two buttons for modify and delete

 $grid->edit('/admin/user/edit', 'Edit', 'modify|delete');

How can I create another button (addToList) example

 $grid->edit('/admin/user/edit', 'Edit', 'modify|delete|addToList'); 

where I can update just some of the User object attributes/ somethign like a subgrid.

What would be the steps in creating this new edit button (addToList) in Rapyd.

Regards, Daniel

You can't overwrite edit button but...

you can do something like this:

 $grid->add('mybutton','mybutton')->cell( function ($value, $row) {

        //$my_custom_condition = $row->something == ....
        //$my_custom_link = route('my.route',['id'=>$row->ID])
        if ($my_custom_condition)
        {
            return $my_custom_link;
        }

});