Skip to content
tanthammar edited this page Jan 4, 2021 · 2 revisions

Sponsors only

Please 💗 sponsor this package 🔗 in order to get access to Panels. The documentation is available in the sponsor repository.

Extends BaseField

Combine with other fields

You can use normal fields and panels in the same form Panels

Validation errors below each field

Panels

->childColspan(int $cols)

Set nested field colspan Panels

->childStacked()

  • Apply $field->stacked() to all nested fields, can be overridden in each field.

->childInline()

  • Apply $field->inline() to all nested fields, can be overridden in each field.

Icons

Example

Panel::make('Address')->fields([
    Input::make('Street')->rules('required'),
    Input::make('City')->rules('required'),
])->tallIcon('icons.add-outline')
  ->childColspan(6)
  ->stacked(),
  
Panel::make('Bio')->fields([
    KeyVal::make('Personal')->fields([
        Input::make('Profession')->help('Field help')->rules('required|in:sales,programmer,marketing'),
        Input::make('Spouse')->rules('required'),
        Input::make('Pet')->help('Field help')->rules('required'),
        Input::make('Children')->rules('required'),
    ])->childColspan(6),
])->tallIcon('icons.add-outline'),
Clone this wiki locally