# Nova Core Fields
# ID
# Text
# Number
# colors
Indicate that value should be displayed as danger when < 0.
Number::make('Price')->colors()
# 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')
# Select
# Password
# maskLabel
Sets the mask label.
Password::make('Password')->maskLabel('******')
# 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')
# Trix
# 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()
# Image
# 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()
# Currency
# colors
Indicate that value should be displayed as danger when < 0.
Currency::make('Price')->colors()
# Date
# DateTime
# hideTimezone
Indicate that you don't want to show the user timezone in this field.
DateTime::make('Created At', 'created_at')->hideTimezone()