33 lines
672 B
PHP
33 lines
672 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: sunny
|
|
* Date: 2019/2/26
|
|
* Time: 2:51 PM
|
|
*/
|
|
|
|
namespace App\Api\Resources;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class AccountLogsResource extends JsonResource
|
|
{
|
|
/**
|
|
* 小程序,账户日志返回的数据
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
|
|
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'rule_title' => $this->rule->title,
|
|
'variable'=>number_format($this->variable,2),
|
|
'rule_remark' =>$this->rule->remark,
|
|
'created_at' =>$this->created_at,
|
|
];
|
|
}
|
|
}
|