2017-06-09 09:37:51 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Repositories;
|
|
|
|
|
|
|
|
use App\Models\Aircraft;
|
|
|
|
|
|
|
|
class AircraftRepository extends BaseRepository
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var array
|
|
|
|
*/
|
2017-06-11 07:27:19 +08:00
|
|
|
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;
|
|
|
|
}
|
2017-06-11 07:27:19 +08:00
|
|
|
|
|
|
|
public function findByICAO($icao)
|
|
|
|
{
|
|
|
|
return $this->findByField('icao', $icao)->first();
|
|
|
|
}
|
2017-06-09 09:37:51 +08:00
|
|
|
}
|