1
0

first commit

This commit is contained in:
2020-08-06 15:36:28 +08:00
commit fe5c11976c
12348 changed files with 1411979 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\ResourceCollection;
class BankCollection extends ResourceCollection
{
/**
* 将资源集合转换成数组。
*
* @param \Illuminate\Http\Request
* @return array
*/
public function toArray($request)
{
$array = [];
foreach ($this->collection as $key => $bank) {
$array[$key]['id'] = $bank->id;
$array[$key]['title'] = $bank->title;
}
return $array;
}
}