链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

372 lines
11 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | dcat-admin name
  6. |--------------------------------------------------------------------------
  7. |
  8. | This value is the name of dcat-admin, This setting is displayed on the
  9. | login page.
  10. |
  11. */
  12. 'name' => '懒族后台管理系统',
  13. /*
  14. |--------------------------------------------------------------------------
  15. | dcat-admin logo
  16. |--------------------------------------------------------------------------
  17. |
  18. | The logo of all admin pages. You can also set it as an image by using a
  19. | `img` tag, eg '<img src="http://logo-url" alt="Admin logo">'.
  20. |
  21. */
  22. // 'logo' => '<img src="/vendors/dcat-admin/images/logo.png" width="35"> &nbsp;懒族',
  23. 'logo' => '<img src="/vendors/dcat-admin/images/logo-head.png" width="35"> &nbsp;<span style="color:#ed7b1d;">懒族</span>',
  24. /*
  25. |--------------------------------------------------------------------------
  26. | dcat-admin mini logo
  27. |--------------------------------------------------------------------------
  28. |
  29. | The logo of all admin pages when the sidebar menu is collapsed. You can
  30. | also set it as an image by using a `img` tag, eg
  31. | '<img src="http://logo-url" alt="Admin logo">'.
  32. |
  33. */
  34. 'logo-mini' => '<img src="/vendors/dcat-admin/images/logo.png">',
  35. /*
  36. |--------------------------------------------------------------------------
  37. | User default avatar
  38. |--------------------------------------------------------------------------
  39. |
  40. | Set a default avatar for newly created users.
  41. |
  42. */
  43. 'default_avatar' => '@admin/images/default-avatar.jpg',
  44. /*
  45. |--------------------------------------------------------------------------
  46. | dcat-admin route settings
  47. |--------------------------------------------------------------------------
  48. |
  49. | The routing configuration of the admin page, including the path prefix,
  50. | the controller namespace, and the default middleware. If you want to
  51. | access through the root path, just set the prefix to empty string.
  52. |
  53. */
  54. 'route' => [
  55. 'prefix' => env('ADMIN_ROUTE_PREFIX', 'admin'),
  56. 'namespace' => 'App\\Admin\\Controllers',
  57. 'middleware' => ['web', 'admin'],
  58. ],
  59. /*
  60. |--------------------------------------------------------------------------
  61. | dcat-admin install directory
  62. |--------------------------------------------------------------------------
  63. |
  64. | The installation directory of the controller and routing configuration
  65. | files of the administration page. The default is `app/Admin`, which must
  66. | be set before running `artisan admin::install` to take effect.
  67. |
  68. */
  69. 'directory' => app_path('Admin'),
  70. /*
  71. |--------------------------------------------------------------------------
  72. | dcat-admin html title
  73. |--------------------------------------------------------------------------
  74. |
  75. | Html title for all pages.
  76. |
  77. */
  78. 'title' => 'Admin',
  79. /*
  80. |--------------------------------------------------------------------------
  81. | Assets hostname
  82. |--------------------------------------------------------------------------
  83. |
  84. */
  85. 'assets_server' => env('ADMIN_ASSETS_SERVER'),
  86. /*
  87. |--------------------------------------------------------------------------
  88. | Access via `https`
  89. |--------------------------------------------------------------------------
  90. |
  91. | If your page is going to be accessed via https, set it to `true`.
  92. |
  93. */
  94. 'https' => env('ADMIN_HTTPS', false),
  95. /*
  96. |--------------------------------------------------------------------------
  97. | dcat-admin auth setting
  98. |--------------------------------------------------------------------------
  99. |
  100. | Authentication settings for all admin pages. Include an authentication
  101. | guard and a user provider setting of authentication driver.
  102. |
  103. | You can specify a controller for `login` `logout` and other auth routes.
  104. |
  105. */
  106. 'auth' => [
  107. 'enable' => true,
  108. 'controller' => App\Admin\Controllers\AuthController::class,
  109. 'guard' => 'admin',
  110. 'guards' => [
  111. 'admin' => [
  112. 'driver' => 'session',
  113. 'provider' => 'admin',
  114. ],
  115. ],
  116. 'providers' => [
  117. 'admin' => [
  118. 'driver' => 'eloquent',
  119. 'model' => Dcat\Admin\Models\Administrator::class,
  120. ],
  121. ],
  122. // Add "remember me" to login form
  123. 'remember' => true,
  124. // All method to path like: auth/users/*/edit
  125. // or specific method to path like: get:auth/users.
  126. 'except' => [
  127. 'auth/login',
  128. 'auth/logout',
  129. ],
  130. ],
  131. 'grid' => [
  132. /*
  133. |--------------------------------------------------------------------------
  134. | The global Grid action display class.
  135. |--------------------------------------------------------------------------
  136. */
  137. 'grid_action_class' => Dcat\Admin\Grid\Displayers\DropdownActions::class,
  138. ],
  139. /*
  140. |--------------------------------------------------------------------------
  141. | dcat-admin helpers setting.
  142. |--------------------------------------------------------------------------
  143. */
  144. 'helpers' => [
  145. 'enable' => env('APP_ENV')=='prod'? false:true,
  146. ],
  147. /*
  148. |--------------------------------------------------------------------------
  149. | dcat-admin permission setting
  150. |--------------------------------------------------------------------------
  151. |
  152. | Permission settings for all admin pages.
  153. |
  154. */
  155. 'permission' => [
  156. // Whether enable permission.
  157. 'enable' => true,
  158. // All method to path like: auth/users/*/edit
  159. // or specific method to path like: get:auth/users.
  160. 'except' => [
  161. '/',
  162. 'auth/login',
  163. 'auth/logout',
  164. 'auth/setting',
  165. ],
  166. ],
  167. /*
  168. |--------------------------------------------------------------------------
  169. | dcat-admin menu setting
  170. |--------------------------------------------------------------------------
  171. |
  172. */
  173. 'menu' => [
  174. 'cache' => [
  175. // enable cache or not
  176. 'enable' => false,
  177. 'store' => 'file',
  178. ],
  179. // Whether enable menu bind to a permission.
  180. 'bind_permission' => true,
  181. ],
  182. /*
  183. |--------------------------------------------------------------------------
  184. | dcat-admin upload setting
  185. |--------------------------------------------------------------------------
  186. |
  187. | File system configuration for form upload files and images, including
  188. | disk and upload path.
  189. |
  190. */
  191. 'upload' => [
  192. // Disk in `config/filesystem.php`.
  193. 'disk' => 'oss',
  194. // Image and file upload path under the disk above.
  195. 'directory' => [
  196. 'image' => 'mp_images',
  197. 'file' => 'mp_files',
  198. ],
  199. ],
  200. /*
  201. |--------------------------------------------------------------------------
  202. | dcat-admin database settings
  203. |--------------------------------------------------------------------------
  204. |
  205. | Here are database settings for dcat-admin builtin model & tables.
  206. |
  207. */
  208. 'database' => [
  209. // Database connection for following tables.
  210. 'connection' => '',
  211. // User tables and model.
  212. 'users_table' => 'admin_users',
  213. 'users_model' => Dcat\Admin\Models\Administrator::class,
  214. // Role table and model.
  215. 'roles_table' => 'admin_roles',
  216. 'roles_model' => Dcat\Admin\Models\Role::class,
  217. // Permission table and model.
  218. 'permissions_table' => 'admin_permissions',
  219. 'permissions_model' => Dcat\Admin\Models\Permission::class,
  220. // Menu table and model.
  221. 'menu_table' => 'admin_menu',
  222. 'menu_model' => Dcat\Admin\Models\Menu::class,
  223. // Pivot table for table above.
  224. 'operation_log_table' => 'admin_operation_log',
  225. 'role_users_table' => 'admin_role_users',
  226. 'role_permissions_table' => 'admin_role_permissions',
  227. 'role_menu_table' => 'admin_role_menu',
  228. 'permission_menu_table' => 'admin_permission_menu',
  229. ],
  230. /*
  231. |--------------------------------------------------------------------------
  232. | User operation log setting
  233. |--------------------------------------------------------------------------
  234. |
  235. | By setting this option to open or close operation log in dcat-admin.
  236. |
  237. */
  238. 'operation_log' => [
  239. 'enable' => true,
  240. // Only logging allowed methods in the list
  241. 'allowed_methods' => ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH'],
  242. 'secret_fields' => [
  243. 'password',
  244. 'password_confirmation',
  245. ],
  246. // Routes that will not log to database.
  247. // All method to path like: auth/logs/*/edit
  248. // or specific method to path like: get:auth/logs.
  249. 'except' => [
  250. 'auth/logs*',
  251. ],
  252. ],
  253. /*
  254. |--------------------------------------------------------------------------
  255. | Admin map field provider
  256. |--------------------------------------------------------------------------
  257. |
  258. | Supported: "tencent", "google", "yandex".
  259. |
  260. */
  261. 'map_provider' => 'tencent',
  262. /*
  263. |--------------------------------------------------------------------------
  264. | Application layout
  265. |--------------------------------------------------------------------------
  266. |
  267. | This value is the layout of admin pages.
  268. */
  269. 'layout' => [
  270. // indigo, blue, blue-light, blue-dark, green
  271. 'color' => 'green',
  272. //'body_class' => 'dark-mode',
  273. 'body_class' => '',
  274. 'sidebar_collapsed' => false,
  275. 'sidebar_dark' => false,
  276. 'dark_mode_switch' => false,
  277. // bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark
  278. 'navbar_color' => '',
  279. ],
  280. /*
  281. |--------------------------------------------------------------------------
  282. | The exception handler class
  283. |--------------------------------------------------------------------------
  284. |
  285. */
  286. 'exception_handler' => \Dcat\Admin\Exception\Handler::class,
  287. /*
  288. |--------------------------------------------------------------------------
  289. | Enable default breadcrumb
  290. |--------------------------------------------------------------------------
  291. |
  292. | Whether enable default breadcrumb for every page content.
  293. */
  294. 'enable_default_breadcrumb' => true,
  295. /*
  296. |--------------------------------------------------------------------------
  297. | Extension Directory
  298. |--------------------------------------------------------------------------
  299. |
  300. | When you use command `php artisan admin:extend` to generate extensions,
  301. | the extension files will be generated in this directory.
  302. */
  303. 'extension_dir' => app_path('Admin/Extensions'),
  304. /*
  305. |--------------------------------------------------------------------------
  306. | Settings for extensions.
  307. |--------------------------------------------------------------------------
  308. |
  309. | You can find all available extensions here
  310. | https://github.com/dcat-admin-extensions.
  311. |
  312. */
  313. 'extensions' => [
  314. ],
  315. ];