當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Menu::group方法代碼示例

本文整理匯總了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);
開發者ID:codebreez,項目名稱:collejo-core,代碼行數:5,代碼來源:menus.php

示例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);
開發者ID:codebreez,項目名稱:collejo-core,代碼行數:6,代碼來源:menus.php

示例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);
開發者ID:codebreez,項目名稱:collejo-core,代碼行數:12,代碼來源:menus.php

示例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);
開發者ID:codebreez,項目名稱:collejo-core,代碼行數:12,代碼來源:menus.php


注:本文中的Menu::group方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。