phpvms/app/Repositories/AirportRepository.php

35 lines
638 B
PHP
Raw Normal View History

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