Hi,
I am Using Maatwebsite Packege to upload excel file into my app.
What I have done so far,
I just make a form and import my CSV, all things are working fine. But I want it when the user uploads the file it should update all records based on the id mentioned in my CSV file.
I don't have any idea how I can do this
my Upload file code is below
Route::post('import', [App\Http\Controllers\dataController::class, 'import'])->name('import');
public function import()
{
Excel::import(new SuccessImport,request()->file('file'));
return back();
}
my Import Class
return new Successfull([
'id' => $row[0],
'first_name' => $row[1],
'last_name' => $row[2],
'email' => $row[3],
'reservation_id' => $row[4],
'entry_id' => $row[5],
'products' => $row[6],
'shopify_order_id' => $row[7],
]);