How to make laravel route in datatable

How to make laravel route in datatable

BeqaWinchesterBeqaWinchester Posts: 1Questions: 1Answers: 0

Description of problem: Hello guys. I want to make laravel redirect when admin clicks user details button in datatable JS
{{ route('admin.user.details', $user->id) }} (Like this). how to do that?

Answers

  • gajananchitaregajananchitare Posts: 1Questions: 0Answers: 0

    ->editColumn('custome_code', function ($row) {
    $data = '<a href="'.route('admin.user.details',[$user->id]).'" target="_self">'.$row->custome_code.'</a>';
    return $data;
    })

    Without curly braces

Sign In or Register to comment.