| null */ protected ?array $columns = null; /** * @param array | int | string | null $columns */ final public function __construct(array | int | string | null $columns = 2) { $this->columns($columns); } /** * @param array | int | string | null $columns */ public static function make(array | int | string | null $columns = 2): static { $static = app(static::class, ['columns' => $columns]); $static->configure(); return $static; } /** * @param array | int | string | null $columns */ public function columns(array | int | string | null $columns = 2): static { if (! is_array($columns)) { $columns = [ 'lg' => $columns, ]; } $this->columns = [ ...($this->columns ?? []), ...$columns, ]; return $this; } /** * @return array | null */ public function getGridColumns(): ?array { return $this->columns; } }