sergionc
6 months ago
793
7
Laravel

datatable eloquent

Posted 6 months ago by sergionc

correctly returns the json, but if I need a specific column of a related id. Thanks.

public function dtpago()
{
    return datatables()
    ->eloquent(Pago::query())
    ->addColumn('btn','pago.action')
    ->rawColumns(['btn'])
    ->toJson();
}

Please sign in or create an account to participate in this conversation.