phpvms/app/Repositories/FareRepository.php
2017-08-24 13:03:10 -05:00

35 lines
549 B
PHP

<?php
namespace App\Repositories;
use App\Models\Fare;
use Prettus\Repository\Eloquent\BaseRepository;
class FareRepository extends BaseRepository
{
/**
* @var array
*/
protected $fieldSearchable = [
'code',
'name',
'price',
'cost',
'notes',
'active'
];
/**
* Configure the Model
**/
public function model()
{
return Fare::class;
}
public function findByCode($code) {
return $this->findByField('code', $code)->first();
}
}