-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotificationLevel.php
More file actions
42 lines (34 loc) · 1.33 KB
/
NotificationLevel.php
File metadata and controls
42 lines (34 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php namespace PatchNotes\Models;
use Illuminate\Database\Eloquent\Model;
/**
* An Eloquent Model: 'NotificationLevel'
*
* @property integer $level
* @property string $name
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @property string $queue
* @property integer $id
* @method static \Illuminate\Database\Query\Builder|\NotificationLevel whereId($value)
* @method static \Illuminate\Database\Query\Builder|\NotificationLevel whereLevel($value)
* @method static \Illuminate\Database\Query\Builder|\NotificationLevel whereName($value)
* @method static \Illuminate\Database\Query\Builder|\NotificationLevel whereQueue($value)
* @method static \Illuminate\Database\Query\Builder|\NotificationLevel whereCreatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\NotificationLevel whereUpdatedAt($value)
* @property string $key
* @method static \Illuminate\Database\Query\Builder|\NotificationLevel whereKey($value)
*/
class NotificationLevel extends Model
{
protected $table = 'notification_levels';
protected $fillable = array('level', 'name', 'queue');
public static function selectBox()
{
$options = [];
$levels = self::all();
foreach ($levels as $level) {
$options[$level->id] = $level->name;
}
return $options;
}
}