admin.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  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' => '<img src="/vendor/dcat-admin/images/logo.png" width="35"> &nbsp;家明托育',
  23. //'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' => '<img src="/vendor/dcat-admin/images/logo.png">',
  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' => '管理',
  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', true),
  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. /*
  135. |--------------------------------------------------------------------------
  136. | The global Grid setting
  137. |--------------------------------------------------------------------------
  138. */
  139. 'grid' => [
  140. // The global Grid action display class.
  141. 'grid_action_class' => Dcat\Admin\Grid\Displayers\DropdownActions::class,
  142. // The global Grid batch action display class.
  143. 'batch_action_class' => Dcat\Admin\Grid\Tools\BatchActions::class,
  144. // The global Grid pagination display class.
  145. 'paginator_class' => Dcat\Admin\Grid\Tools\Paginator::class,
  146. 'actions' => [
  147. 'view' => Dcat\Admin\Grid\Actions\Show::class,
  148. 'edit' => Dcat\Admin\Grid\Actions\Edit::class,
  149. 'quick_edit' => Dcat\Admin\Grid\Actions\QuickEdit::class,
  150. 'delete' => Dcat\Admin\Grid\Actions\Delete::class,
  151. 'batch_delete' => Dcat\Admin\Grid\Tools\BatchDelete::class,
  152. ],
  153. // The global Grid column selector setting.
  154. 'column_selector' => [
  155. 'store' => Dcat\Admin\Grid\ColumnSelector\SessionStore::class,
  156. 'store_params' => [
  157. 'driver' => 'file',
  158. ],
  159. ],
  160. ],
  161. /*
  162. |--------------------------------------------------------------------------
  163. | dcat-admin helpers setting.
  164. |--------------------------------------------------------------------------
  165. */
  166. 'helpers' => [
  167. 'enable' => true,
  168. ],
  169. /*
  170. |--------------------------------------------------------------------------
  171. | dcat-admin permission setting
  172. |--------------------------------------------------------------------------
  173. |
  174. | Permission settings for all admin pages.
  175. |
  176. */
  177. 'permission' => [
  178. // Whether enable permission.
  179. 'enable' => true,
  180. // All method to path like: auth/users/*/edit
  181. // or specific method to path like: get:auth/users.
  182. 'except' => [
  183. '/',
  184. 'auth/login',
  185. 'auth/logout',
  186. 'auth/setting',
  187. ],
  188. ],
  189. /*
  190. |--------------------------------------------------------------------------
  191. | dcat-admin menu setting
  192. |--------------------------------------------------------------------------
  193. |
  194. */
  195. 'menu' => [
  196. 'cache' => [
  197. // enable cache or not
  198. 'enable' => false,
  199. 'store' => 'file',
  200. ],
  201. // Whether enable menu bind to a permission.
  202. 'bind_permission' => true,
  203. // Whether enable role bind to menu.
  204. 'role_bind_menu' => true,
  205. // Whether enable permission bind to menu.
  206. 'permission_bind_menu' => true,
  207. 'default_icon' => 'feather icon-circle',
  208. ],
  209. /*
  210. |--------------------------------------------------------------------------
  211. | dcat-admin upload setting
  212. |--------------------------------------------------------------------------
  213. |
  214. | File system configuration for form upload files and images, including
  215. | disk and upload path.
  216. |
  217. */
  218. 'upload' => [
  219. // Disk in `config/filesystem.php`.
  220. // 'disk' => 'admin',
  221. 'disk' => 'oss',
  222. // Image and file upload path under the disk above.
  223. 'directory' => [
  224. 'image' => 'golf/images',
  225. 'file' => 'golf/files',
  226. ],
  227. ],
  228. /*
  229. |--------------------------------------------------------------------------
  230. | dcat-admin database settings
  231. |--------------------------------------------------------------------------
  232. |
  233. | Here are database settings for dcat-admin builtin model & tables.
  234. |
  235. */
  236. 'database' => [
  237. // Database connection for following tables.
  238. 'connection' => '',
  239. // User tables and model.
  240. 'users_table' => 'admin_users',
  241. 'users_model' => Dcat\Admin\Models\Administrator::class,
  242. // Role table and model.
  243. 'roles_table' => 'admin_roles',
  244. 'roles_model' => Dcat\Admin\Models\Role::class,
  245. // Permission table and model.
  246. 'permissions_table' => 'admin_permissions',
  247. 'permissions_model' => Dcat\Admin\Models\Permission::class,
  248. // Menu table and model.
  249. 'menu_table' => 'admin_menu',
  250. 'menu_model' => Dcat\Admin\Models\Menu::class,
  251. // Pivot table for table above.
  252. 'role_users_table' => 'admin_role_users',
  253. 'role_permissions_table' => 'admin_role_permissions',
  254. 'role_menu_table' => 'admin_role_menu',
  255. 'permission_menu_table' => 'admin_permission_menu',
  256. 'settings_table' => 'admin_settings',
  257. 'extensions_table' => 'admin_extensions',
  258. 'extension_histories_table' => 'admin_extension_histories',
  259. ],
  260. /*
  261. |--------------------------------------------------------------------------
  262. | Application layout
  263. |--------------------------------------------------------------------------
  264. |
  265. | This value is the layout of admin pages.
  266. */
  267. 'layout' => [
  268. // default, blue, blue-light, green
  269. 'color' => 'deep_blue',
  270. // sidebar-separate
  271. 'body_class' => [],
  272. 'horizontal_menu' => false,
  273. 'sidebar_collapsed' => false,
  274. // light, primary, dark
  275. 'sidebar_style' => 'light',
  276. 'dark_mode_switch' => false,
  277. // bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark
  278. 'navbar_color' => '',
  279. ],
  280. /*
  281. |--------------------------------------------------------------------------
  282. | The exception handler class
  283. |--------------------------------------------------------------------------
  284. |
  285. */
  286. 'exception_handler' => Dcat\Admin\Exception\Handler::class,
  287. /*
  288. |--------------------------------------------------------------------------
  289. | Enable default breadcrumb
  290. |--------------------------------------------------------------------------
  291. |
  292. | Whether enable default breadcrumb for every page content.
  293. */
  294. 'enable_default_breadcrumb' => true,
  295. /*
  296. |--------------------------------------------------------------------------
  297. | Extension
  298. |--------------------------------------------------------------------------
  299. */
  300. 'extension' => [
  301. // When you use command `php artisan admin:ext-make` to generate extensions,
  302. // the extension files will be generated in this directory.
  303. 'dir' => base_path('dcat-admin-extensions'),
  304. ],
  305. ];