phpvms/app/Repositories/FareRepository.php
2018-02-01 16:46:37 -06:00

28 lines
566 B
PHP

<?php
namespace App\Repositories;
use App\Models\Fare;
use Prettus\Repository\Traits\CacheableRepository;
use Prettus\Repository\Contracts\CacheableInterface;
class FareRepository extends BaseRepository implements CacheableInterface
{
use CacheableRepository;
protected $fieldSearchable = [
'code' => 'like',
'name' => 'like',
'notes' => 'like',
];
public function model()
{
return Fare::class;
}
public function findByCode($code) {
return $this->findByField('code', $code)->first();
}
}