/** * Run the database seeds. * * @return void */ public function run() { $access_switch_type = new AccessSwitchType(); $access_switch_type->model = 'ICX6610'; $access_switch_type->is_chassis = 0; $access_switch_type->number_of_ports = 48; $access_switch_type->save(); event(new AccessSwitchTypeWasAdded($access_switch_type)); $access_switch_type = new AccessSwitchType(); $access_switch_type->model = 'SX800'; $access_switch_type->is_chassis = 1; $access_switch_type->number_of_slots = 8; $access_switch_type->save(); event(new AccessSwitchTypeWasAdded($access_switch_type)); }
/** * API to fetch access_switch_types */ public function apiFetchSwitchTypes() { return AccessSwitchType::all(); }