Menu

## City extends Model
in package
uses HasFactory

City.php : 28

Class City

Model for managing city information.

##### Tags

mixin

### Table of Contents

#### Properties

$country : Country
$country_id : int
$created_at : DateTime
$id : int
$name : string
$school : Collection|array<string|int, School>
$state : State
$state_id : int
$status : int
$updated_at : DateTime
$userprofile : Collection|array<string|int, Userprofile>
$fillable : array<string|int, mixed>
  The attributes that are mass assignable.
$table : mixed

#### Methods

country() : BelongsTo
  Get the country for this city.
school() : HasMany
  Get schools in this city.
state() : BelongsTo
  Get the state for this city.
userprofile() : HasMany
  Get user profiles for this city.

### Properties

#### $country read-only

City.php : 0
`public Country $country`

#### $country_id

City.php : 0
`public int $country_id`

#### $created_at

City.php : 0
`public DateTime $created_at`

#### $id

City.php : 0
`public int $id`

#### $name

City.php : 0
`public string $name`

#### $school read-only

City.php : 0
`public Collection|array<string|int, School> $school`

#### $state read-only

City.php : 0
`public State $state`

#### $state_id

City.php : 0
`public int $state_id`

#### $status

City.php : 0
`public int $status`

#### $updated_at

City.php : 0
`public DateTime $updated_at`

#### $userprofile read-only

City.php : 0
`public Collection|array<string|int, Userprofile> $userprofile`

#### $fillable

City.php : 39

The attributes that are mass assignable.

`protected array<string|int, mixed> $fillable = ['country_id', 'state_id', 'name', 'status']`

#### $table

City.php : 32
`protected mixed $table = 'cities'`

### Methods

#### country()

City.php : 48

Get the country for this city.

`public country() : BelongsTo`

##### Return values

BelongsTo

#### school()

City.php : 78

Get schools in this city.

`public school() : HasMany`

##### Return values

HasMany

#### state()

City.php : 58

Get the state for this city.

`public state() : BelongsTo`

##### Return values

BelongsTo

#### userprofile()

City.php : 68

Get user profiles for this city.

`public userprofile() : HasMany`

##### Return values

HasMany

## Search results