We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getTypeColor
1 parent 15a9072 commit 5aa3c2fCopy full SHA for 5aa3c2f
src/Models/ActionMonitoring.php
@@ -20,6 +20,19 @@ class ActionMonitoring extends Model
20
*/
21
protected $guarded = ['id'];
22
23
+ # Methods
24
+
25
+ public function getTypeColor(): string
26
+ {
27
+ return match ($this->action_type) {
28
+ 'read' => 'blue',
29
+ 'store' => 'green',
30
+ 'update' => 'purple',
31
+ 'delete' => 'red',
32
+ default => 'gray',
33
+ };
34
+ }
35
36
# Relations
37
38
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
0 commit comments