| Total Complexity | 3 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class CustomerNote extends Model |
||
| 10 | { |
||
| 11 | use HasFactory; |
||
| 12 | use SoftDeletes; |
||
| 13 | |||
| 14 | protected $primaryKey = 'note_id'; |
||
| 15 | protected $guarded = ['updated_at', 'created_at']; |
||
| 16 | protected $appends = ['author', 'updated_author']; |
||
| 17 | protected $hidden = ['created_by', 'updated_by', 'deleted_at']; |
||
| 18 | protected $casts = [ |
||
| 19 | 'created_at' => 'datetime:M d, Y', |
||
| 20 | 'updated_at' => 'datetime:M d, Y', |
||
| 21 | 'deleted_at' => 'datetime:M d, Y', |
||
| 22 | 'urgent' => 'boolean', |
||
| 23 | 'shared' => 'boolean', |
||
| 24 | ]; |
||
| 25 | |||
| 26 | /* |
||
| 27 | * Name of the user who created the note |
||
| 28 | */ |
||
| 29 | public function getAuthorAttribute() |
||
| 32 | } |
||
| 33 | |||
| 34 | /* |
||
| 35 | * Name of the user who most recently updated the note |
||
| 36 | */ |
||
| 37 | public function getUpdatedAuthorAttribute() |
||
| 43 |