-
-
Notifications
You must be signed in to change notification settings - Fork 669
Expand file tree
/
Copy pathExampleGridScreen.php
More file actions
89 lines (77 loc) · 1.68 KB
/
ExampleGridScreen.php
File metadata and controls
89 lines (77 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
namespace App\Orchid\Screens\Examples;
use Orchid\Screen\Action;
use Orchid\Screen\Screen;
use Orchid\Support\Facades\Layout;
class ExampleGridScreen extends Screen
{
/**
* Fetch data to be displayed on the screen.
*
* @return array
*/
public function query(): iterable
{
return [];
}
/**
* The name of the screen displayed in the header.
*
* @return string|null
*/
public function name(): ?string
{
return 'Grid System';
}
/**
* Display header description.
*
* @return string|null
*/
public function description(): ?string
{
return 'Use powerful grid to build layouts';
}
/**
* The screen's action buttons.
*
* @return Action[]
*/
public function commandBar(): iterable
{
return [];
}
/**
* The screen's layout elements.
*
* @throws \Throwable
*
* @return array
*/
public function layout(): iterable
{
$template = Layout::view('platform::dummy.block');
return [
Layout::split([
$template,
$template,
])->ratio('30/70')->reverseOnPhone(),
Layout::split([
$template,
$template,
])->ratio('40/60'),
Layout::split([
$template,
$template,
])->ratio('50/50'),
Layout::split([
$template,
$template,
])->ratio('60/40'),
Layout::split([
$template,
$template,
])->ratio('70/30'),
];
}
}