This is my code :
public function getRolesData()
{
$roles = Role::All();
return Datatables::of($roles)
->addColumn('action', function ($role) {
return "{!! Form::open(array('method'=>'DELETE', 'route' => array('admin.role.destroy',".$role->id."))) !!}
{!! Form::submit('Delete', array('class'=>'btn btn-danger')) !!}
{!! Form::close() !!}
";
})
->make(true);
}
In 'action' column in view, I get the same code :
{!! Form::open(array('method'=>'DELETE', 'route' => array('admin.role.destroy',1))) !!} {!! Form::submit('Delete', array('class'=>'btn btn-danger')) !!} {!! Form::close() !!}
No submit button is appeared ! what's the mistake in my code ?