Commit 16f12163 authored by Georgios Tsakalos's avatar Georgios Tsakalos
Browse files

change school and lab field names

parent ee933d95
......@@ -27,7 +27,8 @@ class LabService implements LabServiceInterface
public function createLab(array $data)
$lab = R::dispense('lab');
$required = ['name', 'school_id', 'area'];
$required = ['school_id', 'name', 'type', 'area', 'in_school_use', 'out_school_use',
'courses', 'attachment', 'has_network', 'has_server' ];
foreach ($required as $value){
if (array_key_exists($value, $data)){
$lab[$value] = $data[$value];
......@@ -16,8 +16,9 @@ class SchoolService implements SchoolServiceInterface
public function createSchool(array $data)
$school = R::dispense('school');
$required = ['registryNo', 'educationLevel', 'unitType', 'category', 'eduAdmin', 'regionEduAdmin'];
$optional = ['streetAddress', 'phoneNumber', 'faxNumber', 'email'];
$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)) {
$school[$value] = $data[$value];
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