admin.php 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <?php
  2. use App\Admin\Grid\Displayers\RowActions;
  3. return [
  4. /*
  5. |--------------------------------------------------------------------------
  6. | dcat-admin name
  7. |--------------------------------------------------------------------------
  8. |
  9. | This value is the name of dcat-admin, This setting is displayed on the
  10. | login page.
  11. |
  12. */
  13. 'name' => env('ADMIN_NAME', ''),
  14. /*
  15. |--------------------------------------------------------------------------
  16. | dcat-admin logo
  17. |--------------------------------------------------------------------------
  18. |
  19. | The logo of all admin pages. You can also set it as an image by using a
  20. | `img` tag, eg '<img src="http://logo-url" alt="Admin logo">'.
  21. |
  22. */
  23. 'logo' => env('ADMIN_LOGO', ''),
  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' => env('ADMIN_LOGO_MINI', ''),
  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', ''),
  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' => env('ADMIN_TITLE', '资产管理系统'),
  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' => RowActions::class,
  138. 'column_selector' => [
  139. 'store' => Dcat\Admin\Grid\ColumnSelector\CacheStore::class,
  140. 'store_params' => [
  141. 'driver' => 'file',
  142. ],
  143. ],
  144. ],
  145. /*
  146. |--------------------------------------------------------------------------
  147. | dcat-admin helpers setting.
  148. |--------------------------------------------------------------------------
  149. */
  150. 'helpers' => [
  151. 'enable' => true,
  152. ],
  153. /*
  154. |--------------------------------------------------------------------------
  155. | dcat-admin permission setting
  156. |--------------------------------------------------------------------------
  157. |
  158. | Permission settings for all admin pages.
  159. |
  160. */
  161. 'permission' => [
  162. // Whether enable permission.
  163. 'enable' => true,
  164. // All method to path like: auth/users/*/edit
  165. // or specific method to path like: get:auth/users.
  166. 'except' => [
  167. '/',
  168. 'auth/login',
  169. 'auth/logout',
  170. 'auth/setting',
  171. ],
  172. ],
  173. /*
  174. |--------------------------------------------------------------------------
  175. | dcat-admin menu setting
  176. |--------------------------------------------------------------------------
  177. |
  178. */
  179. 'menu' => [
  180. 'cache' => [
  181. // enable cache or not
  182. 'enable' => false,
  183. 'store' => 'file',
  184. ],
  185. // Whether enable menu bind to a permission.
  186. 'bind_permission' => true,
  187. ],
  188. /*
  189. |--------------------------------------------------------------------------
  190. | dcat-admin upload setting
  191. |--------------------------------------------------------------------------
  192. |
  193. | File system configuration for form upload files and images, including
  194. | disk and upload path.
  195. |
  196. */
  197. 'upload' => [
  198. // Disk in `config/filesystem.php`.
  199. 'disk' => 'admin',
  200. // Image and file upload path under the disk above.
  201. 'directory' => [
  202. 'image' => 'images',
  203. 'file' => 'files',
  204. ],
  205. ],
  206. /*
  207. |--------------------------------------------------------------------------
  208. | dcat-admin database settings
  209. |--------------------------------------------------------------------------
  210. |
  211. | Here are database settings for dcat-admin builtin model & tables.
  212. |
  213. */
  214. 'database' => [
  215. // Database connection for following tables.
  216. 'connection' => '',
  217. // User tables and model.
  218. 'users_table' => 'admin_users',
  219. 'users_model' => App\Models\User::class,
  220. // Role table and model.
  221. 'roles_table' => 'admin_roles',
  222. 'roles_model' => App\Models\Role::class,
  223. // Permission table and model.
  224. 'permissions_table' => 'admin_permissions',
  225. 'permissions_model' => App\Models\Permission::class,
  226. // Menu table and model.
  227. 'menu_table' => 'admin_menu',
  228. 'menu_model' => Dcat\Admin\Models\Menu::class,
  229. // Pivot table for table above.
  230. 'role_users_table' => 'admin_role_users',
  231. 'role_permissions_table' => 'admin_role_permissions',
  232. 'role_menu_table' => 'admin_role_menu',
  233. 'permission_menu_table' => 'admin_permission_menu',
  234. ],
  235. /*
  236. |--------------------------------------------------------------------------
  237. | Application layout
  238. |--------------------------------------------------------------------------
  239. |
  240. | This value is the layout of admin pages.
  241. */
  242. 'layout' => [
  243. // default, blue, blue-light, green
  244. 'color' => 'default',
  245. 'body_class' => '',
  246. 'sidebar_collapsed' => false,
  247. // light, primary, dark
  248. 'sidebar_style' => 'light',
  249. 'dark_mode_switch' => true,
  250. // bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark
  251. 'navbar_color' => '',
  252. 'horizontal_menu' => false,
  253. ],
  254. /*
  255. |--------------------------------------------------------------------------
  256. | The exception handler class
  257. |--------------------------------------------------------------------------
  258. |
  259. */
  260. 'exception_handler' => Dcat\Admin\Exception\Handler::class,
  261. /*
  262. |--------------------------------------------------------------------------
  263. | Enable default breadcrumb
  264. |--------------------------------------------------------------------------
  265. |
  266. | Whether enable default breadcrumb for every page content.
  267. */
  268. 'enable_default_breadcrumb' => false,
  269. /*
  270. |--------------------------------------------------------------------------
  271. | Extension
  272. |--------------------------------------------------------------------------
  273. */
  274. 'demo' => env('ADMIN_DEMO', false),
  275. 'chemex_version' => '3.7.0',
  276. ];