1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00
invoiceninja/app/Models/Frequency.php

38 lines
590 B
PHP
Raw Normal View History

2017-01-30 20:40:43 +01:00
<?php
namespace App\Models;
2015-03-16 22:45:25 +01:00
2017-01-29 16:32:59 +01:00
use Cache;
2017-01-30 20:40:43 +01:00
use Eloquent;
2017-01-29 16:32:59 +01:00
use Str;
2015-03-25 20:56:31 +01:00
/**
2017-01-30 20:40:43 +01:00
* Class Frequency.
*/
2015-03-16 22:45:25 +01:00
class Frequency extends Eloquent
{
/**
* @var bool
*/
2015-03-16 22:45:25 +01:00
public $timestamps = false;
2017-01-29 16:32:59 +01:00
2017-02-23 15:33:02 +01:00
/**
* @var array
*/
protected $fillable = [
'name',
];
2017-01-29 16:32:59 +01:00
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;
}
2015-03-16 22:45:25 +01:00
}