admin.php 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  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="/vendor/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="/vendor/dcat-admin/images/logo.png">',
  34. /*
  35. |--------------------------------------------------------------------------
  36. | User default avatar
  37. |--------------------------------------------------------------------------
  38. |
  39. | Set a default avatar for newly created users.
  40. |
  41. */
  42. 'default_avatar' => '@admin/images/default-avatar.jpg',
  43. /*
  44. |--------------------------------------------------------------------------
  45. | dcat-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. 'domain' => env('ADMIN_ROUTE_DOMAIN'),
  55. 'prefix' => env('ADMIN_ROUTE_PREFIX', 'admin'),
  56. 'namespace' => 'App\\Admin\\Controllers',
  57. 'middleware' => ['web', 'admin'],
  58. 'enable_session_middleware' => false,
  59. ],
  60. /*
  61. |--------------------------------------------------------------------------
  62. | dcat-admin install directory
  63. |--------------------------------------------------------------------------
  64. |
  65. | The installation directory of the controller and routing configuration
  66. | files of the administration page. The default is `app/Admin`, which must
  67. | be set before running `artisan admin::install` to take effect.
  68. |
  69. */
  70. 'directory' => app_path('Admin'),
  71. /*
  72. |--------------------------------------------------------------------------
  73. | dcat-admin html title
  74. |--------------------------------------------------------------------------
  75. |
  76. | Html title for all pages.
  77. |
  78. */
  79. 'title' => 'Admin',
  80. /*
  81. |--------------------------------------------------------------------------
  82. | Assets hostname
  83. |--------------------------------------------------------------------------
  84. |
  85. */
  86. 'assets_server' => env('ADMIN_ASSETS_SERVER'),
  87. /*
  88. |--------------------------------------------------------------------------
  89. | Access via `https`
  90. |--------------------------------------------------------------------------
  91. |
  92. | If your page is going to be accessed via https, set it to `true`.
  93. |
  94. */
  95. 'https' => env('ADMIN_HTTPS', false),
  96. /*
  97. |--------------------------------------------------------------------------
  98. | dcat-admin auth setting
  99. |--------------------------------------------------------------------------
  100. |
  101. | Authentication settings for all admin pages. Include an authentication
  102. | guard and a user provider setting of authentication driver.
  103. |
  104. | You can specify a controller for `login` `logout` and other auth routes.
  105. |
  106. */
  107. 'auth' => [
  108. 'enable' => true,
  109. 'controller' => App\Admin\Controllers\AuthController::class,
  110. 'guard' => 'admin',
  111. 'guards' => [
  112. 'admin' => [
  113. 'driver' => 'session',
  114. 'provider' => 'admin',
  115. ],
  116. ],
  117. 'providers' => [
  118. 'admin' => [
  119. 'driver' => 'eloquent',
  120. 'model' => Dcat\Admin\Models\Administrator::class,
  121. ],
  122. ],
  123. // Add "remember me" to login form
  124. 'remember' => true,
  125. // All method to path like: auth/users/*/edit
  126. // or specific method to path like: get:auth/users.
  127. 'except' => [
  128. 'auth/login',
  129. 'auth/logout',
  130. ],
  131. 'enable_session_middleware' => false,
  132. ],
  133. 'grid' => [
  134. /*
  135. |--------------------------------------------------------------------------
  136. | The global Grid action display class.
  137. |--------------------------------------------------------------------------
  138. */
  139. 'grid_action_class' => Dcat\Admin\Grid\Displayers\DropdownActions::class,
  140. ],
  141. /*
  142. |--------------------------------------------------------------------------
  143. | dcat-admin helpers setting.
  144. |--------------------------------------------------------------------------
  145. */
  146. 'helpers' => [
  147. 'enable' => true,
  148. ],
  149. /*
  150. |--------------------------------------------------------------------------
  151. | dcat-admin permission setting
  152. |--------------------------------------------------------------------------
  153. |
  154. | Permission settings for all admin pages.
  155. |
  156. */
  157. 'permission' => [
  158. // Whether enable permission.
  159. 'enable' => true,
  160. // All method to path like: auth/users/*/edit
  161. // or specific method to path like: get:auth/users.
  162. 'except' => [
  163. '/',
  164. 'auth/login',
  165. 'auth/logout',
  166. 'auth/setting',
  167. ],
  168. ],
  169. /*
  170. |--------------------------------------------------------------------------
  171. | dcat-admin menu setting
  172. |--------------------------------------------------------------------------
  173. |
  174. */
  175. 'menu' => [
  176. 'cache' => [
  177. // enable cache or not
  178. 'enable' => false,
  179. 'store' => 'file',
  180. ],
  181. // Whether enable menu bind to a permission.
  182. 'bind_permission' => true,
  183. ],
  184. /*
  185. |--------------------------------------------------------------------------
  186. | dcat-admin upload setting
  187. |--------------------------------------------------------------------------
  188. |
  189. | File system configuration for form upload files and images, including
  190. | disk and upload path.
  191. |
  192. */
  193. 'upload' => [
  194. // Disk in `config/filesystem.php`.
  195. 'disk' => 'public',
  196. // Image and file upload path under the disk above.
  197. 'directory' => [
  198. 'image' => 'images',
  199. 'file' => 'files',
  200. ],
  201. ],
  202. /*
  203. |--------------------------------------------------------------------------
  204. | dcat-admin database settings
  205. |--------------------------------------------------------------------------
  206. |
  207. | Here are database settings for dcat-admin builtin model & tables.
  208. |
  209. */
  210. 'database' => [
  211. // Database connection for following tables.
  212. 'connection' => '',
  213. // User tables and model.
  214. 'users_table' => 'admin_users',
  215. 'users_model' => Dcat\Admin\Models\Administrator::class,
  216. // Role table and model.
  217. 'roles_table' => 'admin_roles',
  218. 'roles_model' => Dcat\Admin\Models\Role::class,
  219. // Permission table and model.
  220. 'permissions_table' => 'admin_permissions',
  221. 'permissions_model' => Dcat\Admin\Models\Permission::class,
  222. // Menu table and model.
  223. 'menu_table' => 'admin_menu',
  224. 'menu_model' => Dcat\Admin\Models\Menu::class,
  225. // Pivot table for table above.
  226. 'role_users_table' => 'admin_role_users',
  227. 'role_permissions_table' => 'admin_role_permissions',
  228. 'role_menu_table' => 'admin_role_menu',
  229. 'permission_menu_table' => 'admin_permission_menu',
  230. 'settings_table' => 'admin_settings',
  231. 'extensions_table' => 'admin_extensions',
  232. 'extension_histories_table' => 'admin_extension_histories',
  233. ],
  234. /*
  235. |--------------------------------------------------------------------------
  236. | Application layout
  237. |--------------------------------------------------------------------------
  238. |
  239. | This value is the layout of admin pages.
  240. */
  241. 'layout' => [
  242. // default, blue, blue-light, green
  243. 'color' => 'default',
  244. 'body_class' => '',
  245. 'sidebar_collapsed' => false,
  246. // light, primary, dark
  247. 'sidebar_style' => 'light',
  248. 'dark_mode_switch' => false,
  249. // bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark
  250. 'navbar_color' => '',
  251. ],
  252. /*
  253. |--------------------------------------------------------------------------
  254. | The exception handler class
  255. |--------------------------------------------------------------------------
  256. |
  257. */
  258. 'exception_handler' => Dcat\Admin\Exception\Handler::class,
  259. /*
  260. |--------------------------------------------------------------------------
  261. | Enable default breadcrumb
  262. |--------------------------------------------------------------------------
  263. |
  264. | Whether enable default breadcrumb for every page content.
  265. */
  266. 'enable_default_breadcrumb' => true,
  267. /*
  268. |--------------------------------------------------------------------------
  269. | Extension
  270. |--------------------------------------------------------------------------
  271. */
  272. 'extension' => [
  273. // When you use command `php artisan admin:ext-make` to generate extensions,
  274. // the extension files will be generated in this directory.
  275. 'dir' => base_path('dcat-admin-extensions'),
  276. ],
  277. ];