链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.4 KiB

5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Admin\Controllers;
  3. use App\Admin\Repositories\LanzuServiceSpeaker;
  4. use Dcat\Admin\Form;
  5. use Dcat\Admin\Grid;
  6. use Dcat\Admin\Show;
  7. use Dcat\Admin\Controllers\AdminController;
  8. class LanzuServiceSpeakerController extends AdminController
  9. {
  10. /**
  11. * Make a grid builder.
  12. *
  13. * @return Grid
  14. */
  15. protected function grid()
  16. {
  17. return Grid::make(new LanzuServiceSpeaker(), function (Grid $grid) {
  18. $grid->id->sortable();
  19. $grid->device_name;
  20. $grid->store_id;
  21. $grid->created_at;
  22. $grid->updated_at->sortable();
  23. $grid->filter(function (Grid\Filter $filter) {
  24. $filter->equal('id');
  25. });
  26. });
  27. }
  28. /**
  29. * Make a show builder.
  30. *
  31. * @param mixed $id
  32. *
  33. * @return Show
  34. */
  35. protected function detail($id)
  36. {
  37. return Show::make($id, new LanzuServiceSpeaker(), function (Show $show) {
  38. $show->id;
  39. $show->created_at;
  40. $show->updated_at;
  41. });
  42. }
  43. /**
  44. * Make a form builder.
  45. *
  46. * @return Form
  47. */
  48. protected function form()
  49. {
  50. return Form::make(new LanzuServiceSpeaker(), function (Form $form) {
  51. $form->display('id');
  52. //$form->image("device_name")->disk('oss');
  53. $form->display('created_at');
  54. $form->display('updated_at');
  55. });
  56. }
  57. }