load->model( $models ); $this->load->library( $libraries ); } public function index() { } public function getVats( $archive ) { $vats = Vat::getVats( $archive ); $this->json( $vats ); } public function addVat() { Vat::create( [] ); } public function saveVat( $vatID ) { $vatrate = $this->input->post( 'vatrate' ); Vat::whereId( $vatID )->update( ['vatrate' => $vatrate] ); } }