I am new to Laravel DataTables and i am trying to insert my controller in the datatables but i am getting an exception.
How to get this done?
PS: When I use the normal route like user/items/'$users->id'/control, it works fine but I want to use the the route like UserController@edit, $user->id
public function getPost()
{
$users= User::where('id', Auth::user()->id);
return Datatables::of($users)->addColumn('action', function ($user) {
return '<a href="{ action('UserController@edit', $user->id)}" title="edit" ><i class="fa fa-edit"></i></a>
';
})->make(true);
}