forked from dbarzin/mercator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRouter.php
51 lines (40 loc) · 907 Bytes
/
Router.php
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
43
44
45
46
47
48
49
50
51
<?php
namespace App;
use App\NetworkSwitches;
use App\Traits\Auditable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use \DateTimeInterface;
class Router extends Model
{
use SoftDeletes, Auditable;
public $table = 'routers';
public static $searchable = [
'name',
'description',
];
protected $dates = [
'created_at',
'updated_at',
'deleted_at',
];
protected $fillable = [
'name',
'description',
'rules',
'created_at',
'updated_at',
'deleted_at',
];
protected function serializeDate(DateTimeInterface $date)
{
return $date->format('Y-m-d H:i:s');
}
/*
public function networkSwitches()
{
// TODO: to change
return $this->hasMany(NetworkSwitches::class, 'router_id', 'id');
}
*/
}