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.
83 lines
1.9 KiB
83 lines
1.9 KiB
<?php
|
|
|
|
namespace App\Admin\Controllers;
|
|
|
|
use Dcat\Admin\Form;
|
|
use Dcat\Admin\Grid;
|
|
use Dcat\Admin\Show;
|
|
use Dcat\Admin\Layout\Content;
|
|
use Dcat\Admin\Controllers\AdminController;
|
|
use Dcat\Admin\Widgets\Card;
|
|
use App\Admin\Repositories\CouponTie;
|
|
use App\Admin\Forms\CouponTieForm;
|
|
use App\Admin\Extensions\CouponTieEdit;
|
|
|
|
class CouponTieController extends AdminController
|
|
{
|
|
/**
|
|
* Make a grid builder.
|
|
*
|
|
* @return Grid
|
|
*/
|
|
protected function grid()
|
|
{
|
|
return Grid::make(new CouponTie(), function (Grid $grid) {
|
|
$grid->activity->sortable();
|
|
$grid->forward->sortable();
|
|
$grid->repay->sortable();
|
|
});
|
|
}
|
|
|
|
public function CouponTieList(Content $content){
|
|
$grid = Grid::make(new CouponTie(), function (Grid $grid) {
|
|
$grid->id;
|
|
$grid->activity->sortable();
|
|
$grid->forward->sortable();
|
|
$grid->repay->sortable();
|
|
|
|
$grid->disableViewButton();
|
|
$grid->disableEditButton();
|
|
$grid->disableDeleteButton();
|
|
|
|
$grid->actions(new CouponTieEdit());
|
|
});
|
|
return $content
|
|
->title('活动绑定')
|
|
->body(new Card($grid));
|
|
}
|
|
|
|
|
|
public function CouponTieForm(Content $content){
|
|
|
|
return $content
|
|
->title('活动绑定')
|
|
->body(new Card(new CouponTieForm()), function(Form $form){});
|
|
}
|
|
|
|
/**
|
|
* Make a show builder.
|
|
*
|
|
* @param mixed $id
|
|
*
|
|
* @return Show
|
|
*/
|
|
// protected function detail($id)
|
|
// {
|
|
// return Show::make($id, new ImsCjdcMarket(), function (Show $show) {
|
|
|
|
// });
|
|
// }
|
|
|
|
// /**
|
|
// * Make a form builder.
|
|
// *
|
|
// * @return Form
|
|
// */
|
|
protected function form(Content $content)
|
|
{
|
|
return $content
|
|
->title('活动绑定')
|
|
->body(new Card(new CouponTieForm()));
|
|
}
|
|
|
|
}
|