Customers Add+Edit, API WP

This commit is contained in:
Kevin Adametz 2020-06-12 14:46:51 +02:00
parent dc63fa9fb2
commit 75a0f9a38a
120 changed files with 11894 additions and 6134 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);
}
}