mirror of
https://github.com/filamentphp/filament.git
synced 2026-11-01 03:22:54 +08:00
33 lines
756 B
PHP
33 lines
756 B
PHP
<?php
|
|
|
|
namespace Filament\Forms\Components;
|
|
|
|
use Filament\Forms\Components\Contracts\CanEntangleWithSingularRelationships;
|
|
|
|
class Grid extends Component implements CanEntangleWithSingularRelationships
|
|
{
|
|
use Concerns\EntanglesStateWithSingularRelationship;
|
|
|
|
protected string $view = 'filament-forms::components.grid';
|
|
|
|
final public function __construct(array | int | null $columns)
|
|
{
|
|
$this->columns($columns);
|
|
}
|
|
|
|
public static function make(array | int | null $columns = 2): static
|
|
{
|
|
$static = app(static::class, ['columns' => $columns]);
|
|
$static->configure();
|
|
|
|
return $static;
|
|
}
|
|
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
|
|
$this->columnSpan('full');
|
|
}
|
|
}
|