本文整理汇总了PHP中Menu::group方法的典型用法代码示例。如果您正苦于以下问题:PHP Menu::group方法的具体用法?PHP Menu::group怎么用?PHP Menu::group使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Menu
的用法示例。
在下文中一共展示了Menu::group方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
<?php
Menu::group(trans('acl::permission.menu_permissions'), 'fa-lock', function ($parent) {
Menu::create('roles.list', trans('acl::permission.menu_roles'))->setParent($parent)->setPermission('add_remove_permission_to_role');
})->setOrder(5);
示例2: function
<?php
Menu::group(trans('classes::class.menu_classes'), 'fa-graduation-cap', function ($parent) {
Menu::create('batches.list', trans('classes::batch.menu_batches'))->setParent($parent)->setPermission('list_batches');
Menu::create('grades.list', trans('classes::grade.menu_grades'))->setParent($parent)->setPermission('list_grades');
})->setOrder(1);
示例3: function
<?php
Menu::group(trans('employees::employee.menu_employees'), 'fa-briefcase', function ($parent) {
Menu::create('employees.list', trans('employees::employee.menu_employee_list'))->setParent($parent)->setPermission('list_employees');
Menu::create('employee.new', trans('employees::employee.menu_employee_new'))->setParent($parent)->setPermission('create_employee');
Menu::group(function ($parent) {
Menu::create('employee_categories.list', trans('employees::employee_category.menu_categories'))->setParent($parent)->setPermission('list_employee_cetegories');
Menu::create('employee_positions.list', trans('employees::employee_position.menu_positions'))->setParent($parent)->setPermission('list_employee_positions');
Menu::create('employee_grades.list', trans('employees::employee_grade.menu_grades'))->setParent($parent)->setPermission('list_employee_grades');
Menu::create('employee_departments.list', trans('employees::employee_department.menu_departments'))->setParent($parent)->setPermission('list_employee_departments');
})->setParent($parent);
})->setOrder(3);
示例4: function
<?php
Menu::group(trans('students::student.menu_students'), 'fa-users', function ($parent) {
Menu::create('students.list', trans('students::student.menu_students_list'))->setParent($parent)->setPermission('list_students');
Menu::create('student.new', trans('students::student.menu_student_new'))->setParent($parent)->setPermission('create_student');
Menu::group(function ($parent) {
Menu::create('guardians.list', trans('students::guardian.menu_guardians'))->setParent($parent)->setPermission('list_guardians');
})->setParent($parent);
Menu::group(function ($parent) {
Menu::create('student_categories.list', trans('students::student_category.menu_categories'))->setParent($parent)->setPermission('list_student_categories');
})->setParent($parent);
})->setOrder(2);