namespace App\Imports; use App\User; use Maatwebsite\Excel\Concerns\ToModel; class UsersImport implements ToModel { }
namespace App\Imports; use App\User; use Maatwebsite\Excel\Concerns\ToModel; class UsersImport implements ToModel { public function model(array $row) { return new User([ 'email' => $row[1], ]) } }