| 1 | <?php |
||
| 22 | class Email extends Model implements MailModelContract |
||
| 23 | {
|
||
| 24 | use SoftDeletes; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * The attributes that are mass assignable. |
||
| 28 | * |
||
| 29 | * @var array |
||
| 30 | */ |
||
| 31 | protected $fillable = [ |
||
| 32 | 'libelle', |
||
| 33 | 'body_type', |
||
| 34 | 'action', |
||
| 35 | 'cc', |
||
| 36 | 'bcc', |
||
| 37 | 'content', |
||
| 38 | 'status', |
||
| 39 | ]; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * The attributes that should be cast to native types. |
||
| 43 | * |
||
| 44 | * @var array |
||
| 45 | */ |
||
| 46 | protected $casts = [ |
||
| 47 | 'id' => 'integer', |
||
| 48 | 'status' => 'boolean', |
||
| 49 | ]; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * The attributes that should be mutated to dates. |
||
| 53 | * |
||
| 54 | * @var array |
||
| 55 | */ |
||
| 56 | protected $dates = [ |
||
| 57 | 'deleted_at', |
||
| 58 | ]; |
||
| 59 | |||
| 60 | /** |
||
| 61 | * {@inheritdoc}
|
||
| 62 | */ |
||
| 63 | public function initByTemplate($view) |
||
| 67 | |||
| 68 | /** |
||
| 69 | * {@inheritdoc}
|
||
| 70 | */ |
||
| 71 | public function getTemplate($view) |
||
| 79 | |||
| 80 | /** |
||
| 81 | * {@inheritdoc}
|
||
| 82 | */ |
||
| 83 | public function getPlain() |
||
| 87 | |||
| 88 | /** |
||
| 89 | * {@inheritdoc}
|
||
| 90 | */ |
||
| 91 | public function getSubject() |
||
| 95 | |||
| 96 | /** |
||
| 97 | * {@inheritdoc}
|
||
| 98 | */ |
||
| 99 | public function getCc() |
||
| 103 | |||
| 104 | /** |
||
| 105 | * {@inheritdoc}
|
||
| 106 | */ |
||
| 107 | public function getBcc() |
||
| 111 | } |
||
| 112 |
If you implement
__calland you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__callis implemented by a parent class and only the child class knows which methods exist: