# Nova Core Fields

# ID

Shared Methods

# Text

Shared Methods

# Number

# colors

Indicate that value should be displayed as danger when < 0.

Number::make('Price')->colors()

Shared Methods

# Textarea

# showContentLabel

Sets the Show Content label.

Textarea::make('Comments')->showContentLabel('Show Comments')

# hideContentLabel

Sets the Hide Content label.

Textarea::make('Comments')->hideContentLabel('Hide Comments')

Shared Methods

# Select

Shared Methods

# Password

# maskLabel

Sets the mask label.

Password::make('Password')->maskLabel('******')

Shared Methods

# Boolean

# yesLabel

Set the label near to the dot when boolean is true.

Boolean::make('Active')->yesLabel('Yeah')

# noLabel

Set the label near to the dot when boolean is false.

Boolean::make('Active')->noLabel('Disabled')

# hideBooleanLabel

Indicate that the label near to the dot should be hidden.

Boolean::make('Active')->hideBooleanLabel()

# dotClasses

Set the classes that should be applied to the status dot.

Boolean::make('Active')->dotClasses('inline-block rounded-full w-2 h-2 mr-1')

# successClass

Set the class that should be applied to the dot when boolean is true.

Boolean::make('Active')->successClass('bg-success')

# dangerClass

Set the class that should be applied to the dot when boolean is false.

Boolean::make('Active')->dangerClass('bg-danger')

Shared Methods

# Trix

Shared Methods

# File

# draggable

Whether the file can be dropped on the input.

File::make('Document')->draggable()

# previewBeforeUpload

Whether the file can be previewed before upload.

File::make('Document')->previewBeforeUpload()

Shared Methods

# Image

Shared Methods

# BelongsTo

# quickCreate

Determine if a new related model can be created without leaving the main form.

BelongsTo::make('Category')->quickCreate()

You can pass fill values for this new modal form

BelongsTo::make('Category')->quickCreate(['campaign' => 1])

# groupedBy

Set the field that should be used to group the resources.

BelongsTo::make('Category')->groupedBy('campaignName')

It also works with nested relations

BelongsTo::make('Category')->groupedBy('campaign.name')

# displayName

Set the field that should be used to be displayed in a Row Field.

Row::make('Lines', [
      BelongsTo::make('Category')->displayName('slug')
    ])

# disableTrashed

Determine if a without trashed option should be hidden.

BelongsTo::make('Category')->disableTrashed()

Shared Methods

# Currency

# colors

Indicate that value should be displayed as danger when < 0.

Currency::make('Price')->colors()

Shared Methods

# Date

Shared Methods

# DateTime

# hideTimezone

Indicate that you don't want to show the user timezone in this field.

DateTime::make('Created At', 'created_at')->hideTimezone()

Shared Methods