admin.php 11 KB

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