1234567891011121314151617181920212223 |
- <?php
- namespace App\Imports;
- use App\Models\Store;
- use Illuminate\Support\Facades\Hash;
- use Maatwebsite\Excel\Concerns\ToModel;
- class ReportImport implements ToModel
- {
- /**
- * @param array $row
- *
- * @return \Illuminate\Database\Eloquent\Model|null
- */
- public function model(array $row)
- {
- return new Store([
- 'name'=>$row[0],
- 'man_id'=>$row[2],
- ]);
- }
- }
|