In my controller
$editable_cols = [
'Id' => false,
'Name' => true,
'Email' => true,
'Created at' => false,
'Updated at' => false];
return $dataTable->render('datatables.dt_eloquent', compact($editable_cols));
And the result in my view is: "Undefined variable: editable_cols"
What is the proper way to pass that array to my view?
Also If anyone knows better way to do inline editable table - please share.
Instead of using compact do
$editable_cols = [
'Id' => false,
'Name' => true,
'Email' => true,
'Created at' => false,
'Updated at' => false];
return $dataTable->render('datatables.dt_eloquent', ['editable_cols=>$editable_cols]);
It works, thanks!
Most helpful comment
Instead of using compact do