2017-06-12 00:36:16 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Repositories;
|
|
|
|
|
|
|
|
use App\Models\Airport;
|
2017-12-01 10:28:45 +08:00
|
|
|
use Prettus\Repository\Contracts\CacheableInterface;
|
|
|
|
use Prettus\Repository\Traits\CacheableRepository;
|
2017-08-25 02:03:10 +08:00
|
|
|
|
2017-06-12 00:36:16 +08:00
|
|
|
|
2017-12-01 10:28:45 +08:00
|
|
|
class AirportRepository extends BaseRepository implements CacheableInterface
|
2017-06-12 00:36:16 +08:00
|
|
|
{
|
2017-12-01 10:28:45 +08:00
|
|
|
use CacheableRepository;
|
|
|
|
|
2017-06-12 00:36:16 +08:00
|
|
|
/**
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $fieldSearchable = [
|
|
|
|
'icao'
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Configure the Model
|
|
|
|
**/
|
|
|
|
public function model()
|
|
|
|
{
|
|
|
|
return Airport::class;
|
|
|
|
}
|
2017-12-01 10:28:45 +08:00
|
|
|
|
|
|
|
public function create(array $attributes)
|
|
|
|
{
|
|
|
|
//$attributes['id'] = $attributes['icao'];
|
|
|
|
return parent::create($attributes);
|
|
|
|
}
|
2017-06-12 00:36:16 +08:00
|
|
|
}
|