Alimentalos/Backend

View on GitHub
app/Observers/CommentObserver.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace App\Observers;

use App\Models\Comment;

class CommentObserver
{
    /**
     * Handle the comment "creating" event.
     *
     * @param Comment $comment
     * @return void
     */
    public function creating(Comment $comment)
    {
        $comment->uuid = uuid();
    }
}