procesing update status

hy on PBO im create button reject.
public function rejected(Request $request,$id)
{
$req = RequestModel::find($id);
$req->update([
‘status’ => “rejected”,
‘tgl_rejected’ => now(),
‘rejecthelpdesk’=>Auth::user()->name,
‘reasonreject’ => $request ->solved
]);this worked.
how to implemented on php maker?
thanks for help.

Read the topic REST API > Create Your Own API Action in the help file.

my intention is to create a trsbt event for the button in the reject buffer list.
What server event should I use?
thanks