richard
/
cyca
Archived
1
0
Fork 0
This repository has been archived on 2024-05-04. You can view files and clone it, but cannot push or open issues or pull requests.
cyca/app/ImportAdapters/Cyca.php

20 lines
525 B
PHP
Executable File

<?php
namespace App\ImportAdapters;
use App\Contracts\ImportAdapter;
use Illuminate\Http\Request;
class Cyca implements ImportAdapter
{
/**
* Transforms data from specified request into an importable array. Data
* collected from the request could be an uploaded file, credentials for
* remote connection, anything the adapter could support.
*/
public function importFromRequest(Request $request): array
{
return json_decode(file_get_contents($request->file('file')), true);
}
}