admin.php 9.9 KB

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