Created
November 21, 2014 18:05
-
-
Save dreamtime/f102b52e5add8c0c75ed to your computer and use it in GitHub Desktop.
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 Scheduler\Repositories; | |
| use Illuminate\Database\Eloquent\Model; | |
| class EloquentAppointmentRepository implements AppointmentRepositoryInterface { | |
| protected $appointment; | |
| public function __construct(Model $appointment) | |
| { | |
| $this->appointment = $appointment; | |
| } | |
| public static function create(array $data) | |
| { | |
| $appointment = $this->appointment->create(array( | |
| 'account_id' => $data['account_id'], | |
| 'account_id' => $data['account_id'], | |
| 'account_id' => $data['account_id'], | |
| 'account_id' => $data['account_id'], | |
| 'account_id' => $data['account_id'], | |
| 'account_id' => $data['account_id'], | |
| )); | |
| } | |
| public function update(array $data) | |
| { | |
| } | |
| public function getByID($id) | |
| { | |
| return $this->appointment->findOrFail($id); | |
| } | |
| public function getAllByUserFromDate($id, $date) | |
| { | |
| return $this->appointment->byUser($id)->startDate($date)->orderBy('appointment_date', 'asc')->columns(); | |
| } | |
| public function getAllByAccountFromDate($aid, $uid, $date) | |
| { | |
| return $this->appointment->whereAccountId($aid)->startDate($date)->columns(); | |
| } | |
| public function getAllBySurgeon($id) | |
| { | |
| return $this->appointment->findOrFail($id); | |
| } | |
| public function getAllByFacility($id) | |
| { | |
| return $this->appointment->findOrFail($id); | |
| } | |
| public static function destroy($id) | |
| { | |
| // return $id; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment