Completed
Push — master ( 89477f...f97380 )
by Mahmoud
08:17
created

CountryRepository::model()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace App\Containers\Countries\Data\Repositories;
4
5
use App\Containers\Countries\Models\Country;
6
use App\Port\Repository\Abstracts\Repository;
7
use Prettus\Repository\Contracts\CacheableInterface;
8
use Prettus\Repository\Traits\CacheableRepository;
9
10
/**
11
 * Class CountryRepository.
12
 *
13
 * @author Mahmoud Zalt <[email protected]>
14
 */
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()
37
    {
38
        return Country::class;
39
    }
40
}
41