admin.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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' => '氢予健康',
  23. /*
  24. |--------------------------------------------------------------------------
  25. | dcat-admin mini logo
  26. |--------------------------------------------------------------------------
  27. |
  28. | The logo of all admin pages when the sidebar menu is collapsed. You can
  29. | also set it as an image by using a `img` tag, eg
  30. | '<img src="http://logo-url" alt="Admin logo">'.
  31. |
  32. */
  33. 'logo-mini' => '<img src="/vendor/dcat-admin/images/logo.png">',
  34. 'map' => ['provider' => 'tencent', 'keys' => ['tencent' => 'JYFBZ-QVR3F-IBWJK-NM2J2-U5QC6-GBFVB']],
  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. 'domain' => env('ADMIN_ROUTE_DOMAIN'),
  56. 'prefix' => env('ADMIN_ROUTE_PREFIX', 'admin'),
  57. 'namespace' => 'App\\Admin\\Controllers',
  58. 'middleware' => ['web', 'admin'],
  59. 'enable_session_middleware' => false,
  60. ],
  61. /*
  62. |--------------------------------------------------------------------------
  63. | dcat-admin install directory
  64. |--------------------------------------------------------------------------
  65. |
  66. | The installation directory of the controller and routing configuration
  67. | files of the administration page. The default is `app/Admin`, which must
  68. | be set before running `artisan admin::install` to take effect.
  69. |
  70. */
  71. 'directory' => app_path('Admin'),
  72. /*
  73. |--------------------------------------------------------------------------
  74. | dcat-admin html title
  75. |--------------------------------------------------------------------------
  76. |
  77. | Html title for all pages.
  78. |
  79. */
  80. 'title' => 'Admin',
  81. /*
  82. |--------------------------------------------------------------------------
  83. | Assets hostname
  84. |--------------------------------------------------------------------------
  85. |
  86. */
  87. 'assets_server' => env('ADMIN_ASSETS_SERVER'),
  88. /*
  89. |--------------------------------------------------------------------------
  90. | Access via `https`
  91. |--------------------------------------------------------------------------
  92. |
  93. | If your page is going to be accessed via https, set it to `true`.
  94. |
  95. */
  96. 'https' => env('ADMIN_HTTPS', false),
  97. /*
  98. |--------------------------------------------------------------------------
  99. | dcat-admin auth setting
  100. |--------------------------------------------------------------------------
  101. |
  102. | Authentication settings for all admin pages. Include an authentication
  103. | guard and a user provider setting of authentication driver.
  104. |
  105. | You can specify a controller for `login` `logout` and other auth routes.
  106. |
  107. */
  108. 'auth' => [
  109. 'enable' => true,
  110. 'controller' => App\Admin\Controllers\AuthController::class,
  111. 'guard' => 'admin',
  112. 'guards' => [
  113. 'admin' => [
  114. 'driver' => 'session',
  115. 'provider' => 'admin',
  116. ],
  117. ],
  118. 'providers' => [
  119. 'admin' => [
  120. 'driver' => 'eloquent',
  121. 'model' => Dcat\Admin\Models\Administrator::class,
  122. ],
  123. ],
  124. // Add "remember me" to login form
  125. 'remember' => true,
  126. // All method to path like: auth/users/*/edit
  127. // or specific method to path like: get:auth/users.
  128. 'except' => [
  129. 'auth/login',
  130. 'auth/logout',
  131. ],
  132. 'enable_session_middleware' => false,
  133. ],
  134. 'grid' => [
  135. /*
  136. |--------------------------------------------------------------------------
  137. | The global Grid action display class.
  138. |--------------------------------------------------------------------------
  139. */
  140. 'grid_action_class' => Dcat\Admin\Grid\Displayers\Actions::class,
  141. 'column_selector' => [
  142. 'store' => Dcat\Admin\Grid\ColumnSelector\SessionStore::class,
  143. 'store_params' => [
  144. 'driver' => 'file',
  145. ],
  146. ],
  147. ],
  148. /*
  149. |--------------------------------------------------------------------------
  150. | dcat-admin helpers setting.
  151. |--------------------------------------------------------------------------
  152. */
  153. 'helpers' => [
  154. 'enable' => true,
  155. ],
  156. /*
  157. |--------------------------------------------------------------------------
  158. | dcat-admin permission setting
  159. |--------------------------------------------------------------------------
  160. |
  161. | Permission settings for all admin pages.
  162. |
  163. */
  164. 'permission' => [
  165. // Whether enable permission.
  166. 'enable' => true,
  167. // All method to path like: auth/users/*/edit
  168. // or specific method to path like: get:auth/users.
  169. 'except' => [
  170. '/',
  171. 'auth/login',
  172. 'auth/logout',
  173. 'auth/setting',
  174. ],
  175. ],
  176. /*
  177. |--------------------------------------------------------------------------
  178. | dcat-admin menu setting
  179. |--------------------------------------------------------------------------
  180. |
  181. */
  182. 'menu' => [
  183. 'cache' => [
  184. // enable cache or not
  185. 'enable' => false,
  186. 'store' => 'file',
  187. ],
  188. // Whether enable menu bind to a permission.
  189. 'bind_permission' => true,
  190. 'default_icon' => 'feather icon-circle',
  191. ],
  192. /*
  193. |--------------------------------------------------------------------------
  194. | dcat-admin upload setting
  195. |--------------------------------------------------------------------------
  196. |
  197. | File system configuration for form upload files and images, including
  198. | disk and upload path.
  199. |
  200. */
  201. 'upload' => [
  202. // Disk in `config/filesystem.php`.
  203. 'disk' => 'admin',
  204. // Image and file upload path under the disk above.
  205. 'directory' => [
  206. 'image' => 'images',
  207. 'file' => 'files',
  208. ],
  209. ],
  210. /*
  211. |--------------------------------------------------------------------------
  212. | dcat-admin database settings
  213. |--------------------------------------------------------------------------
  214. |
  215. | Here are database settings for dcat-admin builtin model & tables.
  216. |
  217. */
  218. 'database' => [
  219. // Database connection for following tables.
  220. 'connection' => '',
  221. // User tables and model.
  222. 'users_table' => 'admin_users',
  223. 'users_model' => Dcat\Admin\Models\Administrator::class,
  224. // Role table and model.
  225. 'roles_table' => 'admin_roles',
  226. 'roles_model' => Dcat\Admin\Models\Role::class,
  227. // Permission table and model.
  228. 'permissions_table' => 'admin_permissions',
  229. 'permissions_model' => Dcat\Admin\Models\Permission::class,
  230. // Menu table and model.
  231. 'menu_table' => 'admin_menu',
  232. 'menu_model' => Dcat\Admin\Models\Menu::class,
  233. // Pivot table for table above.
  234. 'role_users_table' => 'admin_role_users',
  235. 'role_permissions_table' => 'admin_role_permissions',
  236. 'role_menu_table' => 'admin_role_menu',
  237. 'permission_menu_table' => 'admin_permission_menu',
  238. 'settings_table' => 'admin_settings',
  239. 'extensions_table' => 'admin_extensions',
  240. 'extension_histories_table' => 'admin_extension_histories',
  241. ],
  242. /*
  243. |--------------------------------------------------------------------------
  244. | Application layout
  245. |--------------------------------------------------------------------------
  246. |
  247. | This value is the layout of admin pages.
  248. */
  249. 'layout' => [
  250. // default, blue, blue-light, green
  251. 'color' => 'default',
  252. // sidebar-separate
  253. 'body_class' => [],
  254. 'horizontal_menu' => false,
  255. 'sidebar_collapsed' => false,
  256. // light, primary, dark
  257. 'sidebar_style' => 'light',
  258. 'dark_mode_switch' => false,
  259. // bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark
  260. 'navbar_color' => '',
  261. ],
  262. /*
  263. |--------------------------------------------------------------------------
  264. | The exception handler class
  265. |--------------------------------------------------------------------------
  266. |
  267. */
  268. 'exception_handler' => Dcat\Admin\Exception\Handler::class,
  269. /*
  270. |--------------------------------------------------------------------------
  271. | Enable default breadcrumb
  272. |--------------------------------------------------------------------------
  273. |
  274. | Whether enable default breadcrumb for every page content.
  275. */
  276. 'enable_default_breadcrumb' => true,
  277. /*
  278. |--------------------------------------------------------------------------
  279. | Extension
  280. |--------------------------------------------------------------------------
  281. */
  282. 'extension' => [
  283. // When you use command `php artisan admin:ext-make` to generate extensions,
  284. // the extension files will be generated in this directory.
  285. 'dir' => base_path('dcat-admin-extensions'),
  286. ],
  287. ];