phpvms/app/Repositories/AircraftRepository.php

34 lines
544 B
PHP
Raw Normal View History

2017-06-09 09:37:51 +08:00
<?php
namespace App\Repositories;
use App\Models\Aircraft;
class AircraftRepository extends BaseRepository
{
/**
* @var array
*/
protected $fieldSearchable
= [
'icao',
'name',
'full_name',
'registration',
'active',
];
2017-06-09 09:37:51 +08:00
/**
* Configure the Model
**/
public function model()
{
return Aircraft::class;
}
public function findByICAO($icao)
{
return $this->findByField('icao', $icao)->first();
}
2017-06-09 09:37:51 +08:00
}