<?php

namespace App\Repositories\Eloquent;

use App\Models\ActivityLog;
use App\Repositories\Contracts\ActivityLogRepositoryInterface;

class ActivityLogRepository implements ActivityLogRepositoryInterface
{
  public function all() {
    return ActivityLog::all();
  }

  public function find($id) {
    return ActivityLog::findOrFail($id);
  }

  public function create(array $data) {
    return ActivityLog::create($data);
  }

  public function update($id, array $data) {
    $activityLog = ActivityLog::findOrFail($id);
    $activityLog->update($data);
    return $activityLog;
  }

  public function delete($id) {
    return ActivityLog::destroy($id);
  }
}