Commit cb11c165 by 赵增煜

增加权限

parent 7eb3fc3a
......@@ -9,6 +9,7 @@
use Dcat\Admin\Layout\Column;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Layout\Row;
use Dcat\Admin\Admin;
class HomeController extends Controller
{
......@@ -21,7 +22,7 @@ public function index(Content $content)
// $column->row(Dashboard::title());
// $column->row(new Examples\Tickets());
// });
if (! Admin::user()->isRole('pharmacy')) {
$row->column(12, function (Column $column) {
$column->row(function (Row $row) {
$row->column(3, new Statistics\Pharmacy());
......@@ -40,6 +41,8 @@ public function index(Content $content)
//$column->row(new Examples\ProductOrders());
//$column->row(new Examples\Tickets());
});
}
});
}
}
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