1 | <?php |
||
9 | trait LogsActivity |
||
10 | { |
||
11 | use DetectsChanges; |
||
12 | |||
13 | protected static function bootLogsActivity() |
||
39 | |||
40 | public function shouldLogChanges(): bool |
||
48 | |||
49 | public function causesActivity(): MorphTo |
||
53 | |||
54 | public function getDescriptionForEvent(string $eventName): string |
||
58 | |||
59 | /* |
||
60 | * Get the event names that should be recorded. |
||
61 | */ |
||
62 | protected static function eventsToBeRecorded(): array |
||
74 | } |
||
75 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: