Files
water_new/modules/User/Models/UserCertification.php
2023-03-08 09:16:04 +08:00

27 lines
485 B
PHP

<?php
namespace Modules\User\Models;
use App\Models\Model;
use Modules\User\Events\UserCertificationSuccess;
use Modules\User\Traits\BelongsToUser;
class UserCertification extends Model
{
use BelongsToUser;
protected $casts = [
'verified' => 'boolean',
];
protected static function boot()
{
parent::boot();
self::created(function ($certification) {
event(new UserCertificationSuccess($certification));
});
}
}