public function action_add_order() { if (Request::initial()->is_ajax()) { $text = json_decode(Arr::get($_POST, 'text', '')); $check = json_decode(Arr::get($_POST, 'check', '')); $ajax = new Model_Stanki(); $res = $ajax->add_order($text, $check); } }