mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +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;
|
|
}
|
|
}
|