File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ use Encore\Admin\Show;
11
11
12
12
class DummyClass extends AdminController
13
13
{
14
+ /**
15
+ * Title for current resource.
16
+ *
17
+ * @var string
18
+ */
19
+ protected $title = 'DummyModel';
20
+
14
21
/**
15
22
* Make a table builder.
16
23
*
@@ -36,9 +43,9 @@ class DummyClass extends AdminController
36
43
*/
37
44
protected function detail($id)
38
45
{
39
- $show = new Show(DummyModel::findOrFail($id));
46
+ $show = new Show(DummyModel::query()-> findOrFail($id));
40
47
41
- $show->('id', ''ID');
48
+ $show->field ('id', ''ID');
42
49
DummyShowField
43
50
$show->field('created_at', trans('admin.created_at'));
44
51
$show->field('updated_at', trans('admin.updated_at'));
@@ -55,10 +62,10 @@ class DummyClass extends AdminController
55
62
{
56
63
$form = new Form(new DummyModel);
57
64
58
- $form->display('ID');
65
+ $form->display('id', ' ID');
59
66
DummyFormField
60
- $form->display(trans('admin.created_at'));
61
- $form->display(trans('admin.updated_at'));
67
+ $form->display('created_at', trans('admin.created_at'));
68
+ $form->display('updated_at', trans('admin.updated_at'));
62
69
63
70
return $form;
64
71
}
You can’t perform that action at this time.
0 commit comments