Customers Add+Edit, API WP
This commit is contained in:
parent
dc63fa9fb2
commit
75a0f9a38a
120 changed files with 11894 additions and 6134 deletions
54
app/Http/Controllers/Sys/ImportController.php
Executable file
54
app/Http/Controllers/Sys/ImportController.php
Executable 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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue