Total Complexity | 2 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | class Country extends Model |
||
9 | { |
||
10 | |||
11 | public $timestamps = true; |
||
12 | protected $table = 'countries'; |
||
13 | |||
14 | public static function getAll() |
||
15 | { |
||
16 | 4 | return Cache::rememberForever('countries', function () { |
|
17 | 4 | return static::all(); |
|
18 | 4 | }); |
|
19 | } |
||
20 | |||
21 | public static function getAllPlucked() |
||
22 | { |
||
23 | 5 | return Cache::rememberForever('countries_pluck', function () { |
|
24 | 5 | return static::pluck('name', 'id'); |
|
25 | 5 | }); |
|
28 | } |