File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 14
14
"require" : {
15
15
"php" : " >=7.0.0" ,
16
16
"laravel/framework" : " ~5.5" ,
17
- "encore/laravel-admin" : " ~1.5 "
17
+ "encore/laravel-admin" : " ~1.6 "
18
18
},
19
19
"require-dev" : {
20
20
"phpunit/phpunit" : " ~6.0"
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use Encore\Admin\Facades\Admin;
10
10
use Encore\Admin\Layout\Content;
11
11
use App\Http\Controllers\Controller;
12
12
use Encore\Admin\Controllers\ModelForm;
13
+ use Encore\Admin\Show;
13
14
14
15
class DummyClass extends Controller
15
16
{
@@ -31,6 +32,29 @@ class DummyClass extends Controller
31
32
});
32
33
}
33
34
35
+ /**
36
+ * Show interface.
37
+ *
38
+ * @param mixed $id
39
+ * @param Content $content
40
+ *
41
+ * @return Content
42
+ */
43
+ public function show($id)
44
+ {
45
+ return Admin::content(function (Content $content) use ($id) {
46
+
47
+ $content->header('Header');
48
+ $content->description('Description');
49
+
50
+ $content->body(Admin::show(DummyModel::findOrFail($id), function (Show $show) {
51
+
52
+ $show->id('ID');
53
+
54
+ }));
55
+ });
56
+ }
57
+
34
58
/**
35
59
* Edit interface.
36
60
*
You can’t perform that action at this time.
0 commit comments