Skip to content

Instantly share code, notes, and snippets.

@dreamtime
Created November 21, 2014 18:05
Show Gist options
  • Select an option

  • Save dreamtime/f102b52e5add8c0c75ed to your computer and use it in GitHub Desktop.

Select an option

Save dreamtime/f102b52e5add8c0c75ed to your computer and use it in GitHub Desktop.
<?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