2022-12-13 15:57:33 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Api\v1\Resources;
|
|
|
|
|
|
|
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
|
|
|
|
|
|
|
class TwoFAccountExportCollection extends ResourceCollection
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The resource that this resource collects.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public $collects = TwoFAccountExportResource::class;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Transform the resource collection into an array.
|
|
|
|
*
|
|
|
|
* @param \Illuminate\Http\Request $request
|
2022-12-14 22:20:03 +01:00
|
|
|
* @return array
|
2022-12-13 15:57:33 +01:00
|
|
|
*/
|
|
|
|
public function toArray($request)
|
|
|
|
{
|
2022-12-14 22:20:03 +01:00
|
|
|
return [
|
|
|
|
'app' => '2fauth_v' . config('2fauth.version'),
|
|
|
|
'schema' => 1,
|
|
|
|
'datetime' => now(),
|
|
|
|
'data' => $this->collection,
|
|
|
|
];
|
2022-12-13 15:57:33 +01:00
|
|
|
}
|
|
|
|
}
|