How do I add edit/delete buttons to a custom module items list? I have a custom form on my development site for visitors to create requests, with 3 fields: name, contact, and request.

This is the code in RequestForm.php.

public function getFormId() {
  return 'request_form';
}


This is the form builder.

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['name'] = [
    '#type' =&gt; 'textfield',
    '#title' =&gt; $this-&gt;t('имя'),
  ];
  $form['contact'] = [
    '#type' =&gt; 'textfield',
    '#title' =&gt; $this-&gt;t('контакт'),
  ];
  $form['reqtext'] = [
    '#type' =&gt; 'textarea',
    '#title' =&gt; $this-&gt;t('Текст заявки'),
  ];
  $form['actions']['#type'] = 'actions';
  $form['actions']['submit'] = [
    '#type' =&gt; 'submit',
    '#value' =&gt; $this-&gt;t('Отправить заявку'),
    '#button_type' =&gt; 'primary',
  ];
  return $form;
}


The validation handler isn't implemented; I just need to come up with the basics. The user data is stored in the database. 

public function submitForm(array &amp;$form, FormStateInterface 
$form_state) {
  $name = $form_state-&gt;getValue('name');
  $contact = $form_state-&gt;getValue('contact');
  $reqtext = $form_state-&gt;getValue('reqtext');

  $connection = \Drupal::database();
  $result = $connection-&gt;insert('request')
    -&gt;fields([
      'name' =&gt;  $name,
      'contact' =&gt; $contact,
      'reqtext' =&gt;  $reqtext ,
    ])
    -&gt;execute();
}


The requests are saved in the database, and I need to view, edit, and delete them. 
I created a route to list all of them, using the following code.

.routing.yml

request.list:
path: '/admin/request-list'
defaults:
    _controller: '\Drupal\request\Controller\RequestController::showdata'
    _title: 'Отобразить все заявки'
requirements:
    _role: 'administrator'


The route controller

class RequestController extends ControllerBase {
public function showdata() {
  $listall = \Drupal::database()-&gt;select('request', 'n');
  $listall-&gt;fields('n', array('requestid', 'name', 'contact', 
'reqtext'));
  $result=$listall-&gt;execute()-&gt;fetchAll();

  // Create the row element.
  $rows = array();
  foreach ($result as $row =&gt; $content) {
    $rows[] = array(
      'data' =&gt; array($content-&gt;requestid, $content-&gt;name, $content-        
&gt;contact, $content-&gt;reqtext));
  }

  // Create the header.
  $header = array('requestid', 'name', 'contact', 'reqtext');

  $output = array(
    '#type' =&gt; 'table',
    #theme.
    '#header' =&gt; $header,
    '#rows' =&gt; $rows
  );
  return $output;
}


How and where  do I implement buttons to edit/delete a certain request?

I'm seeing something like a table:

Num Name    Contact        Request                     Options
1   Alex    +7898231231    I need a 10 litres of oil   Edit/Delete
2   John    +7231231231    I need a 50 litres of oil   Edit/Delete


I must be missing something, I guess. There is the "right" way to do this in Drupal 8. 
Any help?
You can try code:

use Drupal\Core\Link;

[...]

// Create the row element.
$rows = array();
foreach ($result as $row =&gt; $content) {
  $rows[] = array('data' =&gt; array($content-&gt;requestid);
  $rows[] = array('data' =&gt; array($content-&gt;name);
  $rows[] = array('data' =&gt; array($content-&gt;contact);
  $rows[] = array('data' =&gt; array($content-&gt;reqtext);
  //Actions.
  $edit_link = Link::createFromRoute($this-&gt;t('Edit'), 'myrouter.edit_form'['id'=&gt;$content-&gt;requestid], [
        'absolute' =&gt;
          TRUE
      ]);

$delete_link = Link::createFromRoute($this-&gt;t('Delete'),'myrouter.delete_form',['id'=&gt;$content-&gt;requestid], ['absolute' =&gt; TRUE]);


$build_link_action = [
      'action_edit' =&gt; [
      '#type' =&gt; 'html_tag',
      '#value' =&gt; $edit_link-&gt;toString(),
      '#tag' =&gt; 'div',
      '#attributes'=&gt;['class'=&gt;['action-edit']]
     ],
     'action_delete' =&gt; [
       '#type' =&gt; 'html_tag',
       '#value' =&gt; $delete_link-&gt;toString(),
       '#tag' =&gt; 'div',
       '#attributes'=&gt;['class'=&gt;['action-edit']]
       ]
      ];


 $rows[] = ['data' =&gt; \Drupal::service('renderer')-&gt;render($build_link_action)];
}

// Create the header.
$headers = array('requestid', 'name', 'contact', 'reqtext','options');


$output['results_table'] = [
  '#theme' =&gt; 'table',
  '#rows' =&gt; $rows,
  '#header' =&gt; $headers,
  '#empty' =&gt; $this-&gt;t('There are no items to display.')
];
return $output