Hi I have the following function:
public function addAction($name,$rating=null,$address,$city,$district=null ,$description=null){
try{
echo "processing";
$chat= new Chat();
$chat->setChatName($name);
$chat->save();
echo "till here";
$institution= new Institution();
$institution->setName($name);
$institution->setChatId($chat->getChatId());
$institution->setAddress($address);
$institution->setCity($city);
$institution->setRating($rating);
$institution->setDescription($district);
$institution->setDistrict($description);
echo "wb here";
$institution->save();
}catch (ErrorException $e){
echo $e;
}
}
The output I have when I go thru the defined toute is only "processing" (the first 'echo") , nothing is added to the db. I figure out where the mistake can be.