eighty9nine / filament-excel-import

Import data into your resource from excel
MIT License
37 stars 11 forks source link

Multiple #14

Open lhonay opened 2 weeks ago

lhonay commented 2 weeks ago

Is it possible to send multiples? how do I do?

mifhai commented 1 week ago

You can use implements ToCollection to send multiple rows data

class UsersImport implements ToCollection
{
    public function collection(Collection $rows)
    {
        foreach ($rows as $row) 
        {
            User::create([
                'name' => $row[0],
            ]);
        }
    }
}