| 1 | <?php |
||
| 15 | class CountryRepository extends Repository implements CacheableInterface { |
||
| 16 | |||
| 17 | use CacheableRepository; |
||
| 18 | |||
| 19 | // cache the query result of all() (getting all countries) for 1 day <when caching is enabled> |
||
| 20 | protected $cacheMinutes = 1440; // 1 day |
||
| 21 | protected $cacheOnly = ['all']; |
||
| 22 | |||
| 23 | |||
| 24 | /** |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | protected $fieldSearchable = [ |
||
| 28 | |||
| 29 | ]; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Specify Model class name. |
||
| 33 | * |
||
| 34 | * @return string |
||
| 35 | */ |
||
| 36 | public function model() |
||
| 40 | } |
||
| 41 |