Refresh
This commit is contained in:
19
app/ImportAdapters/Cyca.php
Executable file
19
app/ImportAdapters/Cyca.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user