| 1 | <?php |
||
| 12 | class Activity extends Model |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * The database table used by the model. |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $table = 'activities'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * This fields may not be filled. |
||
| 23 | * |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | protected $guarded = ['id']; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Let Eloquent only use the created_at column. |
||
| 30 | * |
||
| 31 | * @return array |
||
| 32 | */ |
||
| 33 | public function getDates() |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Let Eloquent only use the created_at column. |
||
| 40 | * |
||
| 41 | * @return null |
||
| 42 | */ |
||
| 43 | public function setUpdatedAtAttribute($value) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Encode the context array into json. |
||
| 50 | * |
||
| 51 | * @return array |
||
| 52 | */ |
||
| 53 | public function setContextAttribute($value) |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Decode the context into an array. |
||
| 60 | * |
||
| 61 | * @return array |
||
| 62 | */ |
||
| 63 | public function getContextAttribute($value) |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Delete all logs (not way back!). |
||
| 70 | * @return void |
||
| 71 | */ |
||
| 72 | public static function deleteAll() |
||
| 76 | } |
||
| 77 |