<?php


namespace App\Repositories;


use App\TrainingType;

class TrainingTypeRepository implements RepositoryInterface
{
    public static function all() {
        return TrainingType::all();
    }

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

    public static function update(array $data, $id){
        TrainingType::findOrFail($id)->update($data);
        return TrainingType::findOrFail($id);
    }

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

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

}
