Menu

## Book extends Model
in package
uses HasFactory

Book.php : 31

Class Book

Model for managing library books and their metadata.

##### Tags

mixin

### Table of Contents

#### Properties

$academic_year_id : int
$author : string
$availability : int
$book_code : string
$category : BookCategory
$category_id : int
$cover_image : string
$created_at : DateTime
$id : int
$isbn_number : string
$lending : BookLending
$school_id : int
$title : string
$updated_at : DateTime
$fillable : mixed
$table : mixed

#### Methods

category() : BelongsTo
  Get the category for this book.
lending() : BelongsTo
  Get the lending record for this book.

### Properties

#### $academic_year_id

Book.php : 0
`public int $academic_year_id`

#### $author

Book.php : 0
`public string $author`

#### $availability

Book.php : 0
`public int $availability`

#### $book_code

Book.php : 0
`public string $book_code`

#### $category read-only

Book.php : 0
`public BookCategory $category`

#### $category_id

Book.php : 0
`public int $category_id`

#### $cover_image

Book.php : 0
`public string $cover_image`

#### $created_at

Book.php : 0
`public DateTime $created_at`

#### $id

Book.php : 0
`public int $id`

#### $isbn_number

Book.php : 0
`public string $isbn_number`

#### $lending read-only

Book.php : 0
`public BookLending $lending`

#### $school_id

Book.php : 0
`public int $school_id`

#### $title

Book.php : 0
`public string $title`

#### $updated_at

Book.php : 0
`public DateTime $updated_at`

#### $fillable

Book.php : 37
`protected mixed $fillable = ['school_id', 'academic_year_id', 'category_id', 'title', 'book_code', 'author', 'availability', 'isbn_number', 'cover_image']`

#### $table

Book.php : 35
`protected mixed $table = 'books'`

### Methods

#### category()

Book.php : 46

Get the category for this book.

`public category() : BelongsTo`

##### Return values

BelongsTo

#### lending()

Book.php : 56

Get the lending record for this book.

`public lending() : BelongsTo`

##### Return values

BelongsTo

## Search results