TahunProgramServices.php 770 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Services;
  3. use App\Repositories\TahunProgramRepositories as repo;
  4. use Exception;
  5. use Illuminate\Support\Facades\DB;
  6. use Illuminate\Support\Facades\Log;
  7. use InvalidArgumentException;
  8. class TahunProgramServices {
  9. private $repo;
  10. public function __construct(repo $repo)
  11. {
  12. $this->repo = $repo;
  13. }
  14. public function repoGetData($offset, $limit) {
  15. return $this->repo->get($offset, $limit);
  16. }
  17. public function repoGetCount() {
  18. return $this->repo->getCount();
  19. }
  20. public function repoGetDataByID($id){
  21. return $this->repo->getById($id);
  22. }
  23. public function repoSave($data){
  24. return $this->repo->save($data);
  25. }
  26. public function repoDeleteById($id) {
  27. return $this->repo->delete($id);
  28. }
  29. }