Bottelet / DaybydayCRM

DaybydayCRM an open-source CRM, to help you keep track of your daily workflow.
https://daybydaycrm.com
2.26k stars 755 forks source link

Search on datatables. #209

Closed lYesterdaYl closed 3 years ago

lYesterdaYl commented 3 years ago

Hi, Maybe this is not your problem, but by any chances, do you know why the search doesn't work on raw column? This is how I do for the raw column. The search function only works for table columns

        return Datatables::of($invoices)
            ->addColumn('invoice_id', function ($invoices) {
                return '<a href="/invoices/' . $invoices->invoice_external_id . '" ">' . $invoices->integration_invoice_id . '</a>';
            })
            ->addColumn('name', function ($invoices) {
                return '<a href="/clients/' . $invoices->client_external_id . '" ">' . $invoices->first_name . ' '. $invoices->last_name . '</a>';
            })
            ->addColumn('total', function ($invoices) {
                $totalPrice = new Money($invoices->subtotal_amount + $invoices->tax_amount - $invoices->discount_amount);

                return app(MoneyConverter::class, ['money' => $totalPrice])->format();
            })