Guest User

Untitled

a guest
Apr 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. class BatchUpdateItemsController extends Controller
  2. {
  3. public function update(Request $request)
  4. {
  5. $file = $request->file('file');
  6.  
  7. $batchImport = new BatchUpdateItems($file);
  8. $status = $batchImport->update();
  9.  
  10. public function update()
  11. {
  12. $this->data = Excel::load($this->data->getRealPath())->get()->toArray();
  13.  
  14. if (!Storage::exists('batchImportTestAllLocalized.xlsx')) {
  15. $this->fail('batchImportTestAllLocalized.xlsx cannot be found');
  16. }
  17. $data = Excel::load('batchImportTestAllLocalized.xlsx', function($reader) {})->get();
Add Comment
Please, Sign In to add comment