Skip to content

Commit b4c2824

Browse files
committed
Update docs
1 parent 4412583 commit b4c2824

4 files changed

Lines changed: 104 additions & 1 deletion

File tree

File renamed without changes.

docs/_sidebar.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Help Desk](logo.png)
1+
![Help Desk](_media/logo.png)
22

33
- [Help Desk](/?id=help-desk)
44
- [Features](/?id=features)
@@ -16,4 +16,11 @@
1616
- [Project structure](/getting-started?id=project-structure)
1717
- [Theme customization](/getting-started?id=theme-customization)
1818

19+
- [Configuration](/configuration?id=configuration)
20+
- [Locales](/configuration?id=locales)
21+
- [Main menu](/configuration?id=main-menu)
22+
23+
- [Permissions](/permissions?id=permissions)
24+
- [Seeder](/permissions?id=seeder)
25+
1926
- [Changelog](/changelog?id=changelog)

docs/configuration.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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+
```

docs/permissions.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Permissions
2+
3+
> The package used to manage the permissions is `spatie/laravel-permission` (you can check the [official docs here](https://spatie.be/docs/laravel-permission/)).
4+
5+
The Help Desk application uses the Roles / Permissions to manage the users permissions to access pages and functions.
6+
7+
## Seeder
8+
9+
By default, there is a set of pre-configured permissions that you can insert into your database by running the seeder `php artisan db:seed --class=PermissionsSeeder` (you can refer to the [Database configuration](/getting-started?id=database-configuration) of the Getting started section for more information).
10+
11+
So if you want to add / update permissions managed by the application, you need to update the `Database\Seeders\PermissionsSeeder` seeder and more precisely the variable `const permissions`.
12+
13+
> **Important:** The seeder check if the permission to insert already exists before inserting it into the database, so you can execute the seeder multiple time if you want.
14+

0 commit comments

Comments
 (0)