31 lines
620 B
PHP
31 lines
620 B
PHP
<?php
|
|
//Programmiert von: Max Heer, Getestet von:
|
|
|
|
namespace kindergartenverwaltung\Controller;
|
|
|
|
use kindergartenverwaltung\Libary\Msg;
|
|
use kindergartenverwaltung\Model\EnthaeltModel;
|
|
|
|
class EnthaeltController
|
|
{
|
|
|
|
private $db;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->db = new EnthaeltModel();
|
|
}
|
|
|
|
public function getInhaltsstoffe($gerichtId)
|
|
{
|
|
$result = $this->db->getEnthaelt($gerichtId);
|
|
return json_encode($result);
|
|
}
|
|
|
|
public function insertEnthaelt($data)
|
|
{
|
|
$result = $this->db->insertEnthaelt($data);
|
|
return json_encode($result);
|
|
}
|
|
}
|
|
?>
|