mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
38 lines
590 B
PHP
38 lines
590 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Cache;
|
|
use Eloquent;
|
|
use Str;
|
|
|
|
/**
|
|
* Class Frequency.
|
|
*/
|
|
class Frequency extends Eloquent
|
|
{
|
|
/**
|
|
* @var bool
|
|
*/
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
];
|
|
|
|
public static function selectOptions()
|
|
{
|
|
$data = [];
|
|
|
|
foreach (Cache::get('frequencies') as $frequency) {
|
|
$name = Str::snake(str_replace(' ', '_', $frequency->name));
|
|
$data[$frequency->id] = trans('texts.freq_' . $name);
|
|
}
|
|
|
|
return $data;
|
|
}
|
|
}
|