Laravel-datatables: parseIncludes with fracal

Created on 16 Oct 2018  路  2Comments  路  Source: yajra/laravel-datatables

Summary of problem or feature request

I can not use the Include parse together with the datatable

Code snippet of problem

$checkins = $this->model->orderBy('created_at', 'desc');
        $this->fractal->parseIncludes(['customer.fidelityCheckins.status']);

        return
            Datatables::of( $checkins)
                ->setTransformer(new FidelityCheckinTransformer)
                ->setSerializer(new ArraySerializer())
                ->addColumn('details', function ($checkins) {
                    return view('fidelity::checkins.partials.table.checkin-details', compact('checkins') );
                })
                ->addColumn('qtyCheckinPending', function ($checkins) {
                    return view('fidelity::checkins.partials.table.checkin-pending', compact('checkins') );
                })
                ->rawColumns(['details', 'qtyCheckinPending'])
                ->make(true);

System details

  • Operating System
  • PHP Version 7.1
  • Laravel Version 5.4
  • Laravel-Datatables Version 8.7.0
need docs question

Most helpful comment

You might be using the wrong fractal manager instance? Try using:

app('datatables.fractal')->parseIncludes(['customer.fidelityCheckins.status']);

All 2 comments

You might be using the wrong fractal manager instance? Try using:

app('datatables.fractal')->parseIncludes(['customer.fidelityCheckins.status']);

You might be using the wrong fractal manager instance? Try using:

app('datatables.fractal')->parseIncludes(['customer.fidelityCheckins.status']);

Thank you @yajra , all ok...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

kamrava picture kamrava  路  3Comments

josiahke picture josiahke  路  3Comments

t0n1zz picture t0n1zz  路  3Comments

jgatringer picture jgatringer  路  3Comments