|
| 1 | +# Configuration |
| 2 | + |
| 3 | +> We are working to make the Help Desk application configurable as much as possible. |
| 4 | +
|
| 5 | +You can check the below section to see the section you can configure easily by using the file `config/system.php`. |
| 6 | + |
| 7 | +## Locales |
| 8 | + |
| 9 | +For now the Help Desk comes with two languages **English** and **French**, so if you are planing to add more languages to the application by adding `lang/**` files, you need to update the `config('system.locales')` configuration. |
| 10 | + |
| 11 | +Below is the default configuration: |
| 12 | + |
| 13 | +```php |
| 14 | +'locales' => [ |
| 15 | + 'en' => 'English', |
| 16 | + 'fr' => 'Français' |
| 17 | +], |
| 18 | +``` |
| 19 | + |
| 20 | +### Example |
| 21 | + |
| 22 | +If you want to add the **Arabic** language, you need to translate the `lang/fr.json` file into a new file name `lang/ar.json`, the update the configuration like the following: |
| 23 | + |
| 24 | +```php |
| 25 | +'locales' => [ |
| 26 | + 'en' => 'English', |
| 27 | + 'fr' => 'Français', |
| 28 | + 'ar' => 'العربية' |
| 29 | +], |
| 30 | +``` |
| 31 | + |
| 32 | +## Main menu |
| 33 | + |
| 34 | +The application main menu is configurable as well in the `config('system.main_menu')` configuration parameter. |
| 35 | + |
| 36 | +You can check the configuration file `config/system.php`, there is the comment below that explains all the parameters you can use to configure your main menu: |
| 37 | + |
| 38 | +```php |
| 39 | +/* |
| 40 | +|-------------------------------------------------------------------------- |
| 41 | +| Main menu configuration |
| 42 | +|-------------------------------------------------------------------------- |
| 43 | +| |
| 44 | +| This value is the definition of the application main menu |
| 45 | +| Used in the 'App\View\Components\MainMenu' blade component |
| 46 | +| |
| 47 | +| Parameters: |
| 48 | +| ----------- |
| 49 | +| - 'title' The translatable title of the menu |
| 50 | +| |
| 51 | +| - 'route' The menu route name |
| 52 | +| |
| 53 | +| - 'icon' The Fontawesome icon class |
| 54 | +| (icons list: http://fontawesome.io/icons/) |
| 55 | +| |
| 56 | +| - 'always_shown' If equals to "true" the menu is always shown without |
| 57 | +| checking permissions, if "false" the 'permissions' parameter |
| 58 | +| is used to show or not the menu item |
| 59 | +| |
| 60 | +| - 'show_notification_indicator' If equals to "true" the menu item will |
| 61 | +| show an indicator if there is notifications not read |
| 62 | +| |
| 63 | +| - 'permissions' The permissions used to show or not the menu item |
| 64 | +| |
| 65 | +| - (Optional) 'children' The sub menu items |
| 66 | +| - 'children.title' The translatable title of the sub menu |
| 67 | +| |
| 68 | +| - 'children.route' The sub menu route name |
| 69 | +| |
| 70 | +| - 'children.icon' The Fontawesome icon class |
| 71 | +| (icons list: http://fontawesome.io/icons/) |
| 72 | +| |
| 73 | +| - 'children.always_shown' If equals to "true" the menu is always |
| 74 | +| shown without checking permissions, if "false" |
| 75 | +| the 'permissions' parameter is used to show or not |
| 76 | +| the menu item |
| 77 | +| |
| 78 | +| - 'children.permissions' The permissions used to show or not |
| 79 | +| the menu item |
| 80 | +| |
| 81 | +*/ |
| 82 | +``` |
0 commit comments