forked from TheRestartProject/restarters.net
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlert.php
More file actions
41 lines (34 loc) · 861 Bytes
/
Alert.php
File metadata and controls
41 lines (34 loc) · 861 Bytes
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
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use DB;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Lang;
use Illuminate\Support\Facades\Log;
use OwenIt\Auditing\Contracts\Auditable;
use Stevebauman\Purify\Facades\Purify;
class Alert extends Model implements Auditable
{
use HasFactory;
use \OwenIt\Auditing\Auditable;
protected $table = 'alerts';
protected $primaryKey = 'id';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'title',
'html',
'ctatitle',
'ctalink',
'start',
'end',
'variant'
];
public function setHtmlAttribute($value)
{
$this->attributes['html'] = $value === null ? null : Purify::clean((string) $value);
}
}