forked from dbarzin/mercator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLan.php
49 lines (39 loc) · 875 Bytes
/
Lan.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
<?php
namespace App;
use App\Traits\Auditable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use \DateTimeInterface;
class Lan extends Model
{
use SoftDeletes, Auditable;
public $table = 'lans';
public static $searchable = [
'name',
'description',
];
protected $dates = [
'created_at',
'updated_at',
'deleted_at',
];
protected $fillable = [
'name',
'description',
'created_at',
'updated_at',
'deleted_at',
];
protected function serializeDate(DateTimeInterface $date)
{
return $date->format('Y-m-d H:i:s');
}
public function lansMen()
{
return $this->belongsToMany(Man::class);
}
public function lansWans()
{
return $this->belongsToMany(Wan::class);
}
}