domainRepository->filter( [ 'page' => $request->get('page',1), ], ['type'] ); $title = "List All Domain"; return view("admin.product.domain.index",compact('domain','title')); } //import domain from file excel public function import(Request $request,Upload $upload) { $filePath = $upload->FileUpload($request->file); if (! $filePath) { return back()->withErrors("Please choose your file"); } Excel::import(new DomainImport, Storage::path($filePath)); unlink(Storage::path($filePath)); return back()->with('success','Import data from file success'); } }