mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-16 05:50:55 +08:00
deleted event param use array instead of model
This commit is contained in:
@@ -31,6 +31,10 @@ class Torrent extends NexusModel
|
||||
'last_action' => 'datetime',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'info_hash',
|
||||
];
|
||||
|
||||
public static $commentFields = [
|
||||
'id', 'name', 'added', 'visible', 'banned', 'owner', 'sp_state', 'promotion_time_type', 'promotion_until', 'pos_state',
|
||||
'hr', 'picktype', 'picktime', 'last_action', 'leechers', 'seeders', 'times_completed', 'views', 'size', 'cover', 'anonymous',
|
||||
|
||||
@@ -16,6 +16,9 @@ class TorrentExtra extends NexusModel
|
||||
{
|
||||
return Attribute::make(
|
||||
get: function ($value) {
|
||||
if (is_null($value)) {
|
||||
return null;
|
||||
}
|
||||
$jsonDecoded = json_decode($value, true);
|
||||
if (is_array($jsonDecoded)) {
|
||||
return $jsonDecoded;
|
||||
|
||||
Reference in New Issue
Block a user