1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 23:22:52 +01:00
invoiceninja/app/Models/Frequency.php
2019-01-30 22:25:07 +11:00

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;
}
}