adding all get all channel functions in channel repo

This commit is contained in:
Prashant Singh 2019-02-14 12:07:08 +05:30
parent b28f48cf95
commit 63bac873c3
1 changed files with 12 additions and 0 deletions

View File

@ -100,4 +100,16 @@ class ChannelRepository extends Repository
$channel->save();
}
}
public function getAllChannel() {
$data = $this->model->get()->toArray();
$channel = [];
foreach($data as $key => $value) {
$channel[$value['id']] = $value['code'];
}
return $channel;
}
}