admin.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Laravel-admin name
  6. |--------------------------------------------------------------------------
  7. |
  8. | This value is the name of laravel-admin, This setting is displayed on the
  9. | login page.
  10. |
  11. */
  12. 'name' => '北京市朝阳区精神卫生中心后台管理系统',
  13. /*
  14. |--------------------------------------------------------------------------
  15. | Laravel-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' => '<b>北京市朝阳区精神卫生中心</b> admin',
  23. /*
  24. |--------------------------------------------------------------------------
  25. | Laravel-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' => '<b>CY</b>',
  34. /*
  35. |--------------------------------------------------------------------------
  36. | Laravel-admin bootstrap setting
  37. |--------------------------------------------------------------------------
  38. |
  39. | This value is the path of laravel-admin bootstrap file.
  40. |
  41. */
  42. 'bootstrap' => app_path('Admin/bootstrap.php'),
  43. /*
  44. |--------------------------------------------------------------------------
  45. | Laravel-admin route settings
  46. |--------------------------------------------------------------------------
  47. |
  48. | The routing configuration of the admin page, including the path prefix,
  49. | the controller namespace, and the default middleware. If you want to
  50. | access through the root path, just set the prefix to empty string.
  51. |
  52. */
  53. 'route' => [
  54. 'prefix' => env('ADMIN_ROUTE_PREFIX', 'admin'),
  55. 'namespace' => 'App\\Admin\\Controllers',
  56. 'middleware' => ['web', 'admin'],
  57. ],
  58. /*
  59. |--------------------------------------------------------------------------
  60. | Laravel-admin install directory
  61. |--------------------------------------------------------------------------
  62. |
  63. | The installation directory of the controller and routing configuration
  64. | files of the administration page. The default is `app/Admin`, which must
  65. | be set before running `artisan admin::install` to take effect.
  66. |
  67. */
  68. 'directory' => app_path('Admin'),
  69. /*
  70. |--------------------------------------------------------------------------
  71. | Laravel-admin html title
  72. |--------------------------------------------------------------------------
  73. |
  74. | Html title for all pages.
  75. |
  76. */
  77. 'title' => 'Admin',
  78. /*
  79. |--------------------------------------------------------------------------
  80. | Access via `https`
  81. |--------------------------------------------------------------------------
  82. |
  83. | If your page is going to be accessed via https, set it to `true`.
  84. |
  85. */
  86. 'https' => env('ADMIN_HTTPS', false),
  87. /*
  88. |--------------------------------------------------------------------------
  89. | Laravel-admin auth setting
  90. |--------------------------------------------------------------------------
  91. |
  92. | Authentication settings for all admin pages. Include an authentication
  93. | guard and a user provider setting of authentication driver.
  94. |
  95. | You can specify a controller for `login` `logout` and other auth routes.
  96. |
  97. */
  98. 'auth' => [
  99. 'controller' => App\Admin\Controllers\AuthController::class,
  100. 'guard' => 'admin',
  101. 'guards' => [
  102. 'admin' => [
  103. 'driver' => 'session',
  104. 'provider' => 'admin',
  105. ],
  106. ],
  107. 'providers' => [
  108. 'admin' => [
  109. 'driver' => 'eloquent',
  110. 'model' => Encore\Admin\Auth\Database\Administrator::class,
  111. ],
  112. ],
  113. // Add "remember me" to login form
  114. 'remember' => true,
  115. // Redirect to the specified URI when user is not authorized.
  116. 'redirect_to' => 'auth/login',
  117. // The URIs that should be excluded from authorization.
  118. 'excepts' => [
  119. 'auth/login',
  120. 'auth/logout',
  121. '_handle_action_',
  122. 'remoteSso',
  123. ],
  124. ],
  125. /*
  126. |--------------------------------------------------------------------------
  127. | Laravel-admin upload setting
  128. |--------------------------------------------------------------------------
  129. |
  130. | File system configuration for form upload files and images, including
  131. | disk and upload path.
  132. |
  133. */
  134. 'upload' => [
  135. // Disk in `config/filesystem.php`.
  136. 'disk' => 'admin',
  137. // Image and file upload path under the disk above.
  138. 'directory' => [
  139. 'image' => 'images',
  140. 'file' => 'files',
  141. ],
  142. ],
  143. /*
  144. |--------------------------------------------------------------------------
  145. | Laravel-admin database settings
  146. |--------------------------------------------------------------------------
  147. |
  148. | Here are database settings for laravel-admin builtin model & tables.
  149. |
  150. */
  151. 'database' => [
  152. // Database connection for following tables.
  153. 'connection' => '',
  154. // User tables and model.
  155. 'users_table' => 'admin_users',
  156. 'users_model' => Encore\Admin\Auth\Database\Administrator::class,
  157. // Role table and model.
  158. 'roles_table' => 'admin_roles',
  159. 'roles_model' => Encore\Admin\Auth\Database\Role::class,
  160. // Permission table and model.
  161. 'permissions_table' => 'admin_permissions',
  162. 'permissions_model' => Encore\Admin\Auth\Database\Permission::class,
  163. // Menu table and model.
  164. 'menu_table' => 'admin_menu',
  165. 'menu_model' => Encore\Admin\Auth\Database\Menu::class,
  166. // Pivot table for table above.
  167. 'operation_log_table' => 'admin_operation_log',
  168. 'user_permissions_table' => 'admin_user_permissions',
  169. 'role_users_table' => 'admin_role_users',
  170. 'role_permissions_table' => 'admin_role_permissions',
  171. 'role_menu_table' => 'admin_role_menu',
  172. ],
  173. /*
  174. |--------------------------------------------------------------------------
  175. | User operation log setting
  176. |--------------------------------------------------------------------------
  177. |
  178. | By setting this option to open or close operation log in laravel-admin.
  179. |
  180. */
  181. 'operation_log' => [
  182. 'enable' => true,
  183. /*
  184. * Only logging allowed methods in the list
  185. */
  186. 'allowed_methods' => ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH'],
  187. /*
  188. * Routes that will not log to database.
  189. *
  190. * All method to path like: admin/auth/logs
  191. * or specific method to path like: get:admin/auth/logs.
  192. */
  193. 'except' => [
  194. 'admin/auth/logs*',
  195. ],
  196. ],
  197. /*
  198. |--------------------------------------------------------------------------
  199. | Indicates whether to check route permission.
  200. |--------------------------------------------------------------------------
  201. */
  202. 'check_route_permission' => true,
  203. /*
  204. |--------------------------------------------------------------------------
  205. | Indicates whether to check menu roles.
  206. |--------------------------------------------------------------------------
  207. */
  208. 'check_menu_roles' => true,
  209. /*
  210. |--------------------------------------------------------------------------
  211. | User default avatar
  212. |--------------------------------------------------------------------------
  213. |
  214. | Set a default avatar for newly created users.
  215. |
  216. */
  217. 'default_avatar' => '/vendor/laravel-admin/AdminLTE/dist/img/user2-160x160.jpg',
  218. /*
  219. |--------------------------------------------------------------------------
  220. | Admin map field provider
  221. |--------------------------------------------------------------------------
  222. |
  223. | Supported: "tencent", "google", "yandex".
  224. |
  225. */
  226. 'map_provider' => 'google',
  227. /*
  228. |--------------------------------------------------------------------------
  229. | Application Skin
  230. |--------------------------------------------------------------------------
  231. |
  232. | This value is the skin of admin pages.
  233. | @see https://adminlte.io/docs/2.4/layout
  234. |
  235. | Supported:
  236. | "skin-blue", "skin-blue-light", "skin-yellow", "skin-yellow-light",
  237. | "skin-green", "skin-green-light", "skin-purple", "skin-purple-light",
  238. | "skin-red", "skin-red-light", "skin-black", "skin-black-light".
  239. |
  240. */
  241. 'skin' => 'skin-blue-light',
  242. /*
  243. |--------------------------------------------------------------------------
  244. | Application layout
  245. |--------------------------------------------------------------------------
  246. |
  247. | This value is the layout of admin pages.
  248. | @see https://adminlte.io/docs/2.4/layout
  249. |
  250. | Supported: "fixed", "layout-boxed", "layout-top-nav", "sidebar-collapse",
  251. | "sidebar-mini".
  252. |
  253. */
  254. 'layout' => ['sidebar-mini', 'sidebar-collapse'],
  255. /*
  256. |--------------------------------------------------------------------------
  257. | Login page background image
  258. |--------------------------------------------------------------------------
  259. |
  260. | This value is used to set the background image of login page.
  261. |
  262. */
  263. 'login_background_image' => '',
  264. /*
  265. |--------------------------------------------------------------------------
  266. | Show version at footer
  267. |--------------------------------------------------------------------------
  268. |
  269. | Whether to display the version number of laravel-admin at the footer of
  270. | each page
  271. |
  272. */
  273. 'show_version' => true,
  274. /*
  275. |--------------------------------------------------------------------------
  276. | Show environment at footer
  277. |--------------------------------------------------------------------------
  278. |
  279. | Whether to display the environment at the footer of each page
  280. |
  281. */
  282. 'show_environment' => true,
  283. /*
  284. |--------------------------------------------------------------------------
  285. | Menu bind to permission
  286. |--------------------------------------------------------------------------
  287. |
  288. | whether enable menu bind to a permission
  289. */
  290. 'menu_bind_permission' => true,
  291. /*
  292. |--------------------------------------------------------------------------
  293. | Enable default breadcrumb
  294. |--------------------------------------------------------------------------
  295. |
  296. | Whether enable default breadcrumb for every page content.
  297. */
  298. 'enable_default_breadcrumb' => true,
  299. /*
  300. |--------------------------------------------------------------------------
  301. | Enable/Disable assets minify
  302. |--------------------------------------------------------------------------
  303. */
  304. 'minify_assets' => [
  305. // Assets will not be minified.
  306. 'excepts' => [
  307. ],
  308. ],
  309. /*
  310. |--------------------------------------------------------------------------
  311. | Enable/Disable sidebar menu search
  312. |--------------------------------------------------------------------------
  313. */
  314. 'enable_menu_search' => true,
  315. /*
  316. |--------------------------------------------------------------------------
  317. | Alert message that will displayed on top of the page.
  318. |--------------------------------------------------------------------------
  319. */
  320. 'top_alert' => '',
  321. /*
  322. |--------------------------------------------------------------------------
  323. | The global Grid action display class.
  324. |--------------------------------------------------------------------------
  325. */
  326. 'grid_action_class' => \Encore\Admin\Grid\Displayers\DropdownActions::class,
  327. /*
  328. |--------------------------------------------------------------------------
  329. | Extension Directory
  330. |--------------------------------------------------------------------------
  331. |
  332. | When you use command `php artisan admin:extend` to generate extensions,
  333. | the extension files will be generated in this directory.
  334. */
  335. 'extension_dir' => app_path('Admin/Extensions'),
  336. /*
  337. |--------------------------------------------------------------------------
  338. | Settings for extensions.
  339. |--------------------------------------------------------------------------
  340. |
  341. | You can find all available extensions here
  342. | https://github.com/laravel-admin-extensions.
  343. |
  344. */
  345. 'extensions' => [
  346. 'wang-editor' => [
  347. // 如果要关掉这个扩展,设置为false
  348. 'enable' => true,
  349. // 编辑器的配置
  350. 'config' => [
  351. 'uploadImgServer' => '/admin/upload',
  352. 'uploadFileName' => 'wangEditorH5File[]'
  353. ]
  354. ],
  355. 'grid-lightbox' => [
  356. // Set to `false` if you want to disable this extension
  357. 'enable' => true,
  358. ]
  359. ],
  360. ];