header('Index') ->description('description') ->body($this->grid()); } /** * Show interface. * * @param mixed $id * @param Content $content * @return Content */ public function show($id, Content $content) { return $content ->header('Detail') ->description('description') ->body($this->detail($id)); } /** * Edit interface. * * @param mixed $id * @param Content $content * @return Content */ public function edit($id, Content $content) { return $content ->header('Edit') ->description('description') ->body($this->form()->edit($id)); } /** * Create interface. * * @param Content $content * @return Content */ public function create(Content $content) { return $content ->header('Create') ->description('description') ->body($this->form()); } /** * Make a grid builder. * * @return Grid */ protected function grid() { $grid = new Grid(new EmailBatch); $grid->id('ID'); $grid->created_at('Created at'); $grid->updated_at('Updated at'); return $grid; } /** * Make a show builder. * * @param mixed $id * @return Show */ protected function detail($id) { $show = new Show(EmailBatch::findOrFail($id)); $show->id('ID'); $show->created_at('Created at'); $show->updated_at('Updated at'); return $show; } /** * Make a form builder. * * @return Form */ protected function form() { $form = new Form(new EmailBatch); $form->display('ID'); $form->display('Created at'); $form->display('Updated at'); return $form; } }