Created
September 16, 2019 03:07
-
-
Save aungwinthant/7bc5ff0478d519d2ab7b108d27198022 to your computer and use it in GitHub Desktop.
Abstract Class For Repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Repositories; | |
abstract class Repository{ | |
public function save(array $data){ | |
return $this->model->create($data); | |
} | |
public function update(array $data){ | |
$this->model->update($data); | |
} | |
public function list(){ | |
return $this->model->all(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment