阶段更新
This commit is contained in:
27
modules/User/Models/UserCertification.php
Normal file
27
modules/User/Models/UserCertification.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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));
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user