Skip to content
Discussion options

You must be logged in to vote

Hi, of course. Below I have provided a basic example. Each element is wrapped in a Repository class so that internal classes can refer to it for value.

use Orchid\Screen\TD;
use Orchid\Screen\Repository;
use Orchid\Support\Facades\Layout;

/**
 * Fetch data to be displayed on the screen.
 *
 * @return array
 */
public function query(): iterable
{
    return [
        'tableNonModels'   => [
            new Repository(['id' => 100, 'name' => 'Madrid', 'created_at' => '01.01.2020']),
            new Repository(['id' => 200, 'name' => 'Valencia', 'created_at' => '01.01.2020']),
            new Repository(['id' => 300, 'name' => 'Almuñécar', 'created_at' => '01.01.2020']),
            new Rep…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jfuentesa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants