Commit 14ddb086 authored by Georgios Tsakalos's avatar Georgios Tsakalos

correct fields of school entity

parent 16f12163
......@@ -16,8 +16,8 @@ class SchoolService implements SchoolServiceInterface
public function createSchool(array $data)
{
$school = R::dispense('school');
$required = ['registry_no', 'name', 'municipality','schooltype_id', 'prefecture_id', 'educationlevel_id',
'eduadmin_id', 'created', 'creator'];
$required = ['registry_no', 'name', 'municipality','schooltype_id', 'prefecture_id',
'educationlevel_id', 'eduadmin_id', 'created', 'creator'];
$optional = ['street_address', 'postal_code', 'phone_number', 'fax_number', 'email'];
foreach ($required as $value) {
if (array_key_exists($value, $data)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment