新增附件事件
This commit is contained in:
17
catch/system/events/AttachmentEvent.php
Normal file
17
catch/system/events/AttachmentEvent.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace catchAdmin\system\events;
|
||||
|
||||
|
||||
use catchAdmin\system\model\Attachments;
|
||||
|
||||
class AttachmentEvent
|
||||
{
|
||||
public function handle($params)
|
||||
{
|
||||
$file = $params['file'];
|
||||
|
||||
unset($params['file']);
|
||||
|
||||
Attachments::store($params, $file);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user