Menu

## LibraryCardImport
in package
implements ToModel, WithHeadingRow

LibraryCardImport.php : 25

Class LibraryCardImport

Handles importing library card details from an Excel file. Supports both students and staff based on registration number or employee ID.

Uses heading rows for column mapping.

### Table of Contents

#### Interfaces

ToModel
WithHeadingRow

#### Methods

model() : Model|null
  Create a LibraryCard model instance from a row.

### Methods

#### model()

LibraryCardImport.php : 38

Create a LibraryCard model instance from a row.

`public model(array<string|int, mixed> $row) : Model|null`

The method:

- Identifies the user as a student or staff
- Prevents duplicate library card creation
- Returns null if the user is not found or already has a card

##### Parameters

$row : array<string|int, mixed>

  Excel row data

##### Return values

Model|null

## Search results