Fields
Columns
All the columns are defined in an array of “columns” inheriting from the class Dysey\Apysey\Abstracts\Field.
Each class has a static makemethod in order to create them. This method accepts different parameters depending on it.
Usually the label is the first parameter, the database column second.
Text
Text::make('Example Label', 'exampleColumnName')Slug
Relation_withis the name of the column linked with the slug.
Slug::make("Example Label", "exampleColumnName", "relation_with"),BelongsTo
BelongsTo::make('Example Label', 'relation_model', 'relation_id', 'relation_resource', 'relation_display_column')BelongsToMany
BelongsToMany::make('Example Label', 'relation_model', 'relation_resource', 'relation_display_column')Boolean
Boolean::make('Example Label', 'exampleColumnName')Date
Date::make('Example Label', 'exampleColumnName')Datetime
Datetime::make('Example Label', 'exampleColumnName')Email
Email::make('Example Label', 'exampleColumnName')File
File::make('Example Label', 'exampleColumnName')Html
A Rich Text Editor (aka WYSIWYG).
Html::make('Example Label', 'exampleColumnName')Image
Image::make('Example Label', 'exampleColumnName')Link
Link::make('Example Label', 'exampleColumnName')Number
It is possible to add additional methods to define the min, the maxand the step
Number::make('Example Label', 'exampleColumnName')->min(1)->max(10)->step(0.5)Password
Password::make('Example Label', 'exampleColumnName')Textarea
Textarea::make('Example Label', 'exampleColumnName')Time
Time::make('Example Label', 'exampleColumnName')Color
Color::make('Example Label', 'exampleColumnName')Last updated