mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
improve torrent approval
This commit is contained in:
27
app/Http/Resources/TorrentOperationLogResource.php
Normal file
27
app/Http/Resources/TorrentOperationLogResource.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class TorrentOperationLogResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'action_type' => $this->action_type,
|
||||
'action_type_text' => $this->actionTypeText,
|
||||
'uid' => $this->uid,
|
||||
'username' => $this->user->username,
|
||||
'comment' => $this->comment,
|
||||
'created_at' => format_datetime($this->created_at)
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user