admin.php 11 KB

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