first commit

This commit is contained in:
Kevin Adametz 2021-01-08 17:48:20 +01:00
commit 0baac018a2
1011 changed files with 145854 additions and 0 deletions

View file

@ -0,0 +1,54 @@
<?php
namespace App\Http\Controllers\SyS;
use App\Http\Controllers\Controller;
use App\Repositories\ImportRepository;
use Request;
class ImportController extends Controller
{
protected $userRepo;
protected $import;
public function __construct(ImportRepository $import)
{
$this->middleware('sysadmin');
$this->import = $import;
}
public function import()
{
$data = [
];
return view('sys.admin.import', $data);
}
public function importStore()
{
$input = Request::all();
return $this->import->upload($input);
}
public function importShow($type, $file, $skip = 0, $limit = 4000)
{
$import = $this->import->read($type, $file, $skip, $limit);
$data = [
'limit' => $limit,
'type' => $type,
'file' => $file,
'import' => $import,
'skip' => $skip,
];
return view('sys.admin.import-show', $data);
}
}