Would be much appreciated, Can anyone please let me advise / know how to upload this file into above mentioned 3 table files using laravel10 & maatwebsite excel
then in the import class implement the model function as shown adding the rest of columns
// app/Imports/YourImportClass.php
namespace App\Imports;
use Maatwebsite\Excel\Concerns\ToModel;
class YourImportClass implements ToModel
{
public function model(array $row)
{
// Define how to create a model from the Excel row data
return new YourModel([
'id' => $row[0],
'vessel_id' => $row[1],
// and so n for each column in the give excel row
]);
}
}