Commit 39074469 by 赵增煜

修改

parent a9705e8b
...@@ -18,6 +18,14 @@ ...@@ -18,6 +18,14 @@
class PharmacyExternalPrescriptionController extends AdminController class PharmacyExternalPrescriptionController extends AdminController
{ {
public function index(Content $content)
{
return $content
->header('580处方') // 设置 content-header 的标题
->description('列表') // 可选,设置 content-header 的副标题
->body($this->grid()); // 设置页面主体为 Grid
}
/** /**
* Make a grid builder. * Make a grid builder.
* *
...@@ -29,7 +37,8 @@ protected function grid() ...@@ -29,7 +37,8 @@ protected function grid()
if (! Admin::user()->pharmacy_id) { if (! Admin::user()->pharmacy_id) {
admin_exit(Content::make()->withError(trans('admin.deny'))); admin_exit(Content::make()->withError(trans('admin.deny')));
} }
$grid->setName('580处方单');
$grid->model()->orderBy('id', 'DESC'); $grid->model()->orderBy('id', 'DESC');
$grid->model()->where('pharmacy_id', Admin::user()->pharmacy_id); $grid->model()->where('pharmacy_id', Admin::user()->pharmacy_id);
$grid->column('id')->sortable(); $grid->column('id')->sortable();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment