Różne: Tabela, wyszukiwanie Ajax,

Referer – redirect – queryParams

if($this->request->referer()) {
    return $this->redirect($this->request->referer());
} else {
    return $this->redirect(['action' => 'articles', '?' => $this->request->getQueryParams()]);
}

get Table object

$project = $this->fetchTable("Projects")->get($id);   // załaduj Model

URL

let url = new URL(location.href);

$('#s_brand_id').on('change', function(){
  var s_brand_id = $(this).val();

  if(s_brand_id) {
    url.searchParams.set('s_brand_id', s_brand_id);
  } else {
    url.searchParams.delete('s_brand_id');
  }
  location.href = url.toString();
});
$s_brand_id = (int) $this->request->getQuery('s_brand_id', null);

if($s_brand_id) {   
  $query->where(['brand_id' => $s_brand_id]);
}

$this->set(compact('s_brand_id'));