admin.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  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' => 'MTB 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' => ' Prime&nbsp; 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="/vendor/dcat-admin/images/logo.png">',
  34. /*
  35. |--------------------------------------------------------------------------
  36. | dcat-admin favicon
  37. |--------------------------------------------------------------------------
  38. |
  39. */
  40. 'favicon' => '@admin/images/favicon.ico',
  41. /*
  42. |--------------------------------------------------------------------------
  43. | User default avatar
  44. |--------------------------------------------------------------------------
  45. |
  46. | Set a default avatar for newly created users.
  47. |
  48. */
  49. 'default_avatar' => '@admin/images/default-avatar.jpg',
  50. /*
  51. |--------------------------------------------------------------------------
  52. | Login page background image
  53. |--------------------------------------------------------------------------
  54. |
  55. | This value is used to set the background image of login page.
  56. |
  57. */
  58. 'login_background_image' => '@admin/images/login-bg.jpg',
  59. /*
  60. |--------------------------------------------------------------------------
  61. | dcat-admin route settings
  62. |--------------------------------------------------------------------------
  63. |
  64. | The routing configuration of the admin page, including the path prefix,
  65. | the controller namespace, and the default middleware. If you want to
  66. | access through the root path, just set the prefix to empty string.
  67. |
  68. */
  69. 'route' => [
  70. 'domain' => env('ADMIN_ROUTE_DOMAIN'),
  71. 'prefix' => env('ADMIN_ROUTE_PREFIX', 'prime-control'),
  72. 'namespace' => 'App\\Admin\\Controllers',
  73. 'middleware' => ['web', 'admin'],
  74. 'enable_session_middleware' => false,
  75. ],
  76. /*
  77. |--------------------------------------------------------------------------
  78. | dcat-admin install directory
  79. |--------------------------------------------------------------------------
  80. |
  81. | The installation directory of the controller and routing configuration
  82. | files of the administration page. The default is `app/Admin`, which must
  83. | be set before running `artisan admin::install` to take effect.
  84. |
  85. */
  86. 'directory' => app_path('Admin'),
  87. /*
  88. |--------------------------------------------------------------------------
  89. | dcat-admin html title
  90. |--------------------------------------------------------------------------
  91. |
  92. | Html title for all pages.
  93. |
  94. */
  95. 'title' => 'Admin',
  96. /*
  97. |--------------------------------------------------------------------------
  98. | Assets hostname
  99. |--------------------------------------------------------------------------
  100. |
  101. */
  102. 'assets_server' => env('ADMIN_ASSETS_SERVER'),
  103. /*
  104. |--------------------------------------------------------------------------
  105. | Access via `https`
  106. |--------------------------------------------------------------------------
  107. |
  108. | If your page is going to be accessed via https, set it to `true`.
  109. |
  110. */
  111. 'https' => env('ADMIN_HTTPS', false),
  112. /*
  113. |--------------------------------------------------------------------------
  114. | dcat-admin auth setting
  115. |--------------------------------------------------------------------------
  116. |
  117. | Authentication settings for all admin pages. Include an authentication
  118. | guard and a user provider setting of authentication driver.
  119. |
  120. | You can specify a controller for `login` `logout` and other auth routes.
  121. |
  122. */
  123. 'auth' => [
  124. 'enable' => true,
  125. 'controller' => App\Admin\Controllers\AuthController::class,
  126. 'guard' => 'admin',
  127. 'guards' => [
  128. 'admin' => [
  129. 'driver' => 'session',
  130. 'provider' => 'admin',
  131. ],
  132. ],
  133. 'providers' => [
  134. 'admin' => [
  135. 'driver' => 'eloquent',
  136. 'model' => Dcat\Admin\Models\Administrator::class,
  137. ],
  138. ],
  139. // Add "remember me" to login form
  140. 'remember' => true,
  141. // All method to path like: auth/users/*/edit
  142. // or specific method to path like: get:auth/users.
  143. 'except' => [
  144. 'auth/login',
  145. 'auth/logout',
  146. ],
  147. 'enable_session_middleware' => false,
  148. ],
  149. /*
  150. |--------------------------------------------------------------------------
  151. | The global Grid setting
  152. |--------------------------------------------------------------------------
  153. */
  154. 'grid' => [
  155. // The global Grid action display class.
  156. 'grid_action_class' => Dcat\Admin\Grid\Displayers\DropdownActions::class,
  157. // The global Grid batch action display class.
  158. 'batch_action_class' => Dcat\Admin\Grid\Tools\BatchActions::class,
  159. // The global Grid pagination display class.
  160. 'paginator_class' => Dcat\Admin\Grid\Tools\Paginator::class,
  161. 'actions' => [
  162. 'view' => Dcat\Admin\Grid\Actions\Show::class,
  163. 'edit' => Dcat\Admin\Grid\Actions\Edit::class,
  164. 'quick_edit' => Dcat\Admin\Grid\Actions\QuickEdit::class,
  165. 'delete' => Dcat\Admin\Grid\Actions\Delete::class,
  166. 'batch_delete' => Dcat\Admin\Grid\Tools\BatchDelete::class,
  167. ],
  168. // The global Grid column selector setting.
  169. 'column_selector' => [
  170. 'store' => Dcat\Admin\Grid\ColumnSelector\SessionStore::class,
  171. 'store_params' => [
  172. 'driver' => 'file',
  173. ],
  174. ],
  175. ],
  176. /*
  177. |--------------------------------------------------------------------------
  178. | dcat-admin helpers setting.
  179. |--------------------------------------------------------------------------
  180. */
  181. 'helpers' => [
  182. 'enable' => true,
  183. ],
  184. /*
  185. |--------------------------------------------------------------------------
  186. | dcat-admin permission setting
  187. |--------------------------------------------------------------------------
  188. |
  189. | Permission settings for all admin pages.
  190. |
  191. */
  192. 'permission' => [
  193. // Whether enable permission.
  194. 'enable' => true,
  195. // All method to path like: auth/users/*/edit
  196. // or specific method to path like: get:auth/users.
  197. 'except' => [
  198. '/',
  199. 'auth/login',
  200. 'auth/logout',
  201. 'auth/setting',
  202. ],
  203. ],
  204. /*
  205. |--------------------------------------------------------------------------
  206. | dcat-admin menu setting
  207. |--------------------------------------------------------------------------
  208. |
  209. */
  210. 'menu' => [
  211. 'cache' => [
  212. // enable cache or not
  213. 'enable' => false,
  214. 'store' => 'file',
  215. ],
  216. // Whether enable menu bind to a permission.
  217. 'bind_permission' => true,
  218. // Whether enable role bind to menu.
  219. 'role_bind_menu' => true,
  220. // Whether enable permission bind to menu.
  221. 'permission_bind_menu' => true,
  222. 'default_icon' => 'feather icon-circle',
  223. ],
  224. /*
  225. |--------------------------------------------------------------------------
  226. | dcat-admin upload setting
  227. |--------------------------------------------------------------------------
  228. |
  229. | File system configuration for form upload files and images, including
  230. | disk and upload path.
  231. |
  232. */
  233. 'upload' => [
  234. // Disk in `config/filesystem.php`.
  235. 'disk' => 'oss',
  236. // Image and file upload path under the disk above.
  237. 'directory' => [
  238. 'image' => 'images',
  239. 'file' => 'files',
  240. ],
  241. 'oss_image' => [
  242. 'accept' => 'jpg,png,gif,jpeg,webp',//允许上传的文件类型
  243. 'max_size' => 1024, // 上传文件大小限制,单位B
  244. ],
  245. ],
  246. /*
  247. |--------------------------------------------------------------------------
  248. | dcat-admin database settings
  249. |--------------------------------------------------------------------------
  250. |
  251. | Here are database settings for dcat-admin builtin model & tables.
  252. |
  253. */
  254. 'database' => [
  255. // Database connection for following tables.
  256. 'connection' => '',
  257. // User tables and model.
  258. 'users_table' => 'admin_users',
  259. 'users_model' => Dcat\Admin\Models\Administrator::class,
  260. // Role table and model.
  261. 'roles_table' => 'admin_roles',
  262. 'roles_model' => Dcat\Admin\Models\Role::class,
  263. // Permission table and model.
  264. 'permissions_table' => 'admin_permissions',
  265. 'permissions_model' => Dcat\Admin\Models\Permission::class,
  266. // Menu table and model.
  267. 'menu_table' => 'admin_menu',
  268. 'menu_model' => Dcat\Admin\Models\Menu::class,
  269. // Pivot table for table above.
  270. 'role_users_table' => 'admin_role_users',
  271. 'role_permissions_table' => 'admin_role_permissions',
  272. 'role_menu_table' => 'admin_role_menu',
  273. 'permission_menu_table' => 'admin_permission_menu',
  274. 'settings_table' => 'admin_settings',
  275. 'extensions_table' => 'admin_extensions',
  276. 'extension_histories_table' => 'admin_extension_histories',
  277. ],
  278. /*
  279. |--------------------------------------------------------------------------
  280. | Application layout
  281. |--------------------------------------------------------------------------
  282. |
  283. | This value is the layout of admin pages.
  284. */
  285. 'layout' => [
  286. // default, blue, blue-light, green
  287. 'color' => 'blue',
  288. // sidebar-separate
  289. 'body_class' => [],
  290. 'horizontal_menu' => false,
  291. 'sidebar_collapsed' => false,
  292. // light, primary, dark
  293. 'sidebar_style' => 'light',
  294. 'dark_mode_switch' => false,
  295. // bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark
  296. 'navbar_color' => '',
  297. 'full_screen' => true, // 是否展示全屏按钮
  298. 'home_url'=> env('APP_URL') // 是否展示官网url
  299. ],
  300. /*
  301. |--------------------------------------------------------------------------
  302. | The exception handler class
  303. |--------------------------------------------------------------------------
  304. |
  305. */
  306. 'exception_handler' => Dcat\Admin\Exception\Handler::class,
  307. /*
  308. |--------------------------------------------------------------------------
  309. | Enable default breadcrumb
  310. |--------------------------------------------------------------------------
  311. |
  312. | Whether enable default breadcrumb for every page content.
  313. */
  314. 'enable_default_breadcrumb' => true,
  315. /*
  316. |--------------------------------------------------------------------------
  317. | Extension
  318. |--------------------------------------------------------------------------
  319. */
  320. 'extension' => [
  321. // When you use command `php artisan admin:ext-make` to generate extensions,
  322. // the extension files will be generated in this directory.
  323. 'dir' => base_path('dcat-admin-extensions'),
  324. ],
  325. /*
  326. |--------------------------------------------------------------------------
  327. | 多应用
  328. |--------------------------------------------------------------------------
  329. */
  330. 'multi_app' => [
  331. // 与新应用的配置文件名称一致
  332. // 设置为true启用,false则是停用
  333. 'distributor' => true,
  334. ],
  335. ];