-
Notifications
You must be signed in to change notification settings - Fork 8
/
Minion.php
56 lines (51 loc) · 1 KB
/
Minion.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
52
53
54
55
56
<?php
/**
* Created by Reliese Model.
*/
namespace Luezoid\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class Minion
*
* @property int $id
* @property string $name
* @property int $total_eyes
* @property string $favourite_sound
* @property bool $has_hairs
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property Mission $leading_mission
*
* @package Luezoid\Models
*/
class Minion extends Model
{
public $filterable = [
'total_eyes',
'has_hairs'
];
public $createExcept = [
'id'
];
public $updateExcept = [
'total_eyes',
'has_hairs'
];
protected $table = 'minions';
protected $casts = [
'total_eyes' => 'int',
'has_hairs' => 'bool'
];
protected $fillable = [
'name',
'total_eyes',
'favourite_sound',
'has_hairs'
];
public function leading_mission()
{
return $this->hasOne(Mission::class, 'lead_by_id');
}
}