| 1 | <?php |
||
| 16 | class Comment extends Model |
||
| 17 | { |
||
| 18 | use SoftDeletes; |
||
| 19 | use GlobalScope; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The database table used by the model. |
||
| 23 | * |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $table = 'comments'; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Attributes that should be mass-assignable. |
||
| 30 | * |
||
| 31 | * @var array |
||
| 32 | */ |
||
| 33 | protected $fillable = ['commentable_type', 'commentable_id', 'user_id', 'comment']; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * The attributes excluded from the model's JSON form. |
||
| 37 | * |
||
| 38 | * @var array |
||
| 39 | */ |
||
| 40 | protected $hidden = []; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * The attributes that should be casted to native types. |
||
| 44 | * |
||
| 45 | * @var array |
||
| 46 | */ |
||
| 47 | protected $casts = []; |
||
| 48 | |||
| 49 | protected $dates = ['deleted_at']; |
||
| 50 | |||
| 51 | protected static function boot() |
||
| 55 | |||
| 56 | public function user() |
||
| 60 | |||
| 61 | public function issue() |
||
| 65 | |||
| 66 | public function statuses() |
||
| 71 | |||
| 72 | public function getDateforhumansAttribute() |
||
| 76 | } |
||
| 77 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.