PHP 8.3.31
Preview: Table.php Size: 1.58 KB
/home/getspomw/royalsquad.us/vendor/laravel/prompts/src/Table.php

<?php

namespace Laravel\Prompts;

use Illuminate\Support\Collection;

class Table extends Prompt
{
    /**
     * The table headers.
     *
     * @var array<int, string|array<int, string>>
     */
    public array $headers;

    /**
     * The table rows.
     *
     * @var array<int, array<int, string>>
     */
    public array $rows;

    /**
     * Create a new Table instance.
     *
     * @param  array<int, string|array<int, string>>|Collection<int, string|array<int, string>>  $headers
     * @param  array<int, array<int, string>>|Collection<int, array<int, string>>  $rows
     *
     * @phpstan-param ($rows is null ? list<list<string>>|Collection<int, list<string>> : list<string|list<string>>|Collection<int, string|list<string>>) $headers
     */
    public function __construct(array|Collection $headers = [], array|Collection|null $rows = null)
    {
        if ($rows === null) {
            $rows = $headers;
            $headers = [];
        }

        $this->headers = $headers instanceof Collection ? $headers->all() : $headers;
        $this->rows = $rows instanceof Collection ? $rows->all() : $rows;
    }

    /**
     * Display the table.
     */
    public function display(): void
    {
        $this->prompt();
    }

    /**
     * Display the table.
     */
    public function prompt(): bool
    {
        $this->capturePreviousNewLines();

        $this->state = 'submit';

        static::output()->write($this->renderTheme());

        return true;
    }

    /**
     * Get the value of the prompt.
     */
    public function value(): bool
    {
        return true;
    }
}

Directory Contents

Dirs: 5 × Files: 22

Name Size Perms Modified Actions
Concerns DIR
- drwxrwxrwx 2025-09-17 06:52:54
Edit Download
- drwxrwxrwx 2025-09-17 06:52:54
Edit Download
Output DIR
- drwxrwxrwx 2026-04-21 16:06:43
Edit Download
Support DIR
- drwxrwxrwx 2025-09-17 06:52:54
Edit Download
Themes DIR
- drwxrwxrwx 2025-09-17 06:52:54
Edit Download
602 B lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
1.36 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
13.51 KB lrw-r--r-- 2026-04-26 08:25:40
Edit Download
9.58 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
1.32 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
7.89 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
1.77 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
6.15 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
4.13 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
702 B lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
1.00 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
568 B lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
4.59 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
10.87 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
4.03 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
3.25 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
3.24 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
3.97 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
1.58 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
2.43 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
6.94 KB lrw-rw-rw- 2025-09-17 06:52:54
Edit Download
885 B lrw-rw-rw- 2025-09-17 06:52:54
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).