Skip to content

Commit 32c0af0

Browse files
committed
add more comments in config
1 parent c9faac0 commit 32c0af0

File tree

1 file changed

+73
-35
lines changed

1 file changed

+73
-35
lines changed

src/config/lfm.php

Lines changed: 73 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,76 @@
11
<?php
22

33
return [
4+
/*
5+
|--------------------------------------------------------------------------
6+
| Routing
7+
|--------------------------------------------------------------------------
8+
*/
9+
10+
// Include to pre-defined routes from package or not. Middlewares
11+
'use_package_routes' => true,
12+
13+
// Middlewares which should be applied to all package routes.
14+
// For laravel 5.1 and before, remove 'web' from the array.
15+
'middlewares' => ['web','auth'],
16+
17+
// The url to this package. Change it if necessary.
18+
'prefix' => 'laravel-filemanager',
19+
20+
/*
21+
|--------------------------------------------------------------------------
22+
| Multi-User Mode
23+
|--------------------------------------------------------------------------
24+
*/
25+
26+
// If true, private folders will be created for each signed-in user.
27+
'allow_multi_user' => true,
28+
29+
// The database column to identify a user. Make sure the value is unique.
30+
// Ex: When set to 'id', the private folder of user will be named as the user id.
31+
'user_field' => 'id',
32+
33+
/*
34+
|--------------------------------------------------------------------------
35+
| Working Directory
36+
|--------------------------------------------------------------------------
37+
*/
38+
39+
// Which folder to store files in project, fill in 'public', 'resources', 'storage' and so on.
40+
// You should create routes to serve images if it is not set to public.
41+
'base_directory' => 'public',
42+
43+
'images_folder_name' => 'photos',
44+
'files_folder_name' => 'files',
45+
46+
'shared_folder_name' => 'shares',
47+
'thumb_folder_name' => 'thumbs',
48+
49+
/*
50+
|--------------------------------------------------------------------------
51+
| Startup Views
52+
|--------------------------------------------------------------------------
53+
*/
54+
55+
// The default display type for items.
56+
// Supported: "grid", "list"
57+
'images_startup_view' => 'grid',
58+
'files_startup_view' => 'list',
59+
60+
/*
61+
|--------------------------------------------------------------------------
62+
| Upload / Validation
63+
|--------------------------------------------------------------------------
64+
*/
65+
466
// If true, the uploaded file will be renamed to uniqid() + file extension.
5-
'rename_file' => false,
67+
'rename_file' => false,
668

769
// If rename_file set to false and this set to true, then non-alphanumeric characters in filename will be replaced.
870
'alphanumeric_filename' => true,
9-
// If true, non-alphanumeric folder name will not be allowed.
10-
'alphanumeric_directory' => false,
11-
12-
'use_package_routes' => true,
13-
14-
// For laravel 5.1, please set to ['auth']
15-
'middlewares' => ['web','auth'],
16-
17-
// Add prefix for routes
18-
'prefix' => 'laravel-filemanager',
19-
20-
// Allow multi_user mode or not.
21-
// If true, laravel-filemanager create private folders for each signed-in user.
22-
'allow_multi_user' => true,
2371

24-
// The database field to identify a user.
25-
// When set to 'id', the private folder will be named as the user id.
26-
// NOTE: make sure to use an unique field.
27-
'user_field' => 'id',
28-
29-
'base_directory' => 'public',
30-
31-
'images_folder_name' => 'photos',
32-
'files_folder_name' => 'files',
33-
34-
'shared_folder_name' => 'shares',
35-
'thumb_folder_name' => 'thumbs',
36-
37-
// When choosing a startup view you can fill either 'grid' or 'list'.
38-
'images_startup_view' => 'list',
39-
'files_startup_view' => 'list',
72+
// If true, non-alphanumeric folder name will be rejected.
73+
'alphanumeric_directory' => false,
4074

4175
'max_image_size' => 500,
4276
'max_file_size' => 1000,
@@ -60,8 +94,13 @@
6094
'text/plain',
6195
],
6296

63-
// file extensions array, only for showing file information, it won't affect the upload process.
64-
'file_type_array' => [
97+
/*
98+
|--------------------------------------------------------------------------
99+
| File Extension Information
100+
|--------------------------------------------------------------------------
101+
*/
102+
103+
'file_type_array' => [
65104
'pdf' => 'Adobe Acrobat',
66105
'doc' => 'Microsoft Word',
67106
'docx' => 'Microsoft Word',
@@ -76,8 +115,7 @@
76115
'pptx' => 'Microsoft PowerPoint',
77116
],
78117

79-
// file extensions array, only for showing icons, it won't affect the upload process.
80-
'file_icon_array' => [
118+
'file_icon_array' => [
81119
'pdf' => 'fa-file-pdf-o',
82120
'doc' => 'fa-file-word-o',
83121
'docx' => 'fa-file-word-o',

0 commit comments

Comments
 (0)