phpvms/app/Repositories/FareRepository.php
2017-12-06 22:48:42 -06:00

28 lines
564 B
PHP

<?php
namespace App\Repositories;
use App\Models\Fare;
use App\Repositories\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();
}
}