Caching & search configuration in repository classes
This commit is contained in:
@@ -11,24 +11,13 @@ class AirportRepository extends BaseRepository implements CacheableInterface
|
||||
{
|
||||
use CacheableRepository;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $fieldSearchable = [
|
||||
'icao'
|
||||
'icao',
|
||||
'name' => 'like',
|
||||
];
|
||||
|
||||
/**
|
||||
* Configure the Model
|
||||
**/
|
||||
public function model()
|
||||
{
|
||||
return Airport::class;
|
||||
}
|
||||
|
||||
public function create(array $attributes)
|
||||
{
|
||||
//$attributes['id'] = $attributes['icao'];
|
||||
return parent::create($attributes);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user