mivita/app/Services/SyS/Import.php
Kevin Adametz 7a040c3e19 06 2022
2022-06-15 18:08:45 +02:00

49 lines
986 B
PHP

<?php
namespace App\Services\SyS;
use Carbon;
use Request;
use App\Models\SySetting;
use App\Repositories\ImportRepository;
class Import
{
public static function show()
{
abort(403, 'STOP funtion not online');
return view('sys.tools.import', []);
}
public static function store()
{
abort(403, 'STOP funtion not online');
}
public function importStore()
{
$input = Request::all();
$import_repo = new ImportRepository();
return $import_repo->upload($input);
}
public function importShow($type, $file, $skip = 0, $limit = 4000)
{
$import_repo = new ImportRepository();
$import = $import_repo->read($type, $file, $skip, $limit);
$data = [
'limit' => $limit,
'type' => $type,
'file' => $file,
'import' => $import,
'skip' => $skip,
];
return view('sys.tools.import-show', $data);
}
}