mirror of
https://github.com/filamentphp/filament.git
synced 2026-11-03 04:24:00 +08:00
33 lines
577 B
PHP
33 lines
577 B
PHP
<?php
|
|
|
|
namespace Filament\Forms\Components;
|
|
|
|
class Grid extends Component
|
|
{
|
|
protected $columns = 2;
|
|
|
|
public static function make($schema = [])
|
|
{
|
|
return (new static())->schema($schema);
|
|
}
|
|
|
|
public function columns($columns)
|
|
{
|
|
$this->configure(function () use ($columns) {
|
|
$this->columns = $columns;
|
|
});
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getColumns()
|
|
{
|
|
return $this->columns;
|
|
}
|
|
|
|
public function getSubform()
|
|
{
|
|
return parent::getSubform()->columns($this->columns);
|
|
}
|
|
}
|