admin.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. <?php
  2. use Dcat\Admin\Grid\Displayers\DropdownActions;
  3. return [
  4. /*
  5. |--------------------------------------------------------------------------
  6. | dcat-admin name
  7. |--------------------------------------------------------------------------
  8. |
  9. | This value is the name of dcat-admin, This setting is displayed on the
  10. | login page.
  11. |
  12. */
  13. 'name' => 'Dcat Admin',
  14. /*
  15. |--------------------------------------------------------------------------
  16. | dcat-admin logo
  17. |--------------------------------------------------------------------------
  18. |
  19. | The logo of all admin pages. You can also set it as an image by using a
  20. | `img` tag, eg '<img src="http://logo-url" alt="Admin logo">'.
  21. |
  22. */
  23. 'logo' => '<span>Dcat</span> Admin',
  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' => '<b>Da</b>',
  35. /*
  36. |--------------------------------------------------------------------------
  37. | dcat-admin route settings
  38. |--------------------------------------------------------------------------
  39. |
  40. | The routing configuration of the admin page, including the path prefix,
  41. | the controller namespace, and the default middleware. If you want to
  42. | access through the root path, just set the prefix to empty string.
  43. |
  44. */
  45. 'route' => [
  46. 'prefix' => env('ADMIN_ROUTE_PREFIX', 'admin'),
  47. 'namespace' => 'App\\Admin\\Controllers',
  48. 'middleware' => ['web', 'admin'],
  49. ],
  50. /*
  51. |--------------------------------------------------------------------------
  52. | dcat-admin install directory
  53. |--------------------------------------------------------------------------
  54. |
  55. | The installation directory of the controller and routing configuration
  56. | files of the administration page. The default is `app/Admin`, which must
  57. | be set before running `artisan admin::install` to take effect.
  58. |
  59. */
  60. 'directory' => app_path('Admin'),
  61. /*
  62. |--------------------------------------------------------------------------
  63. | dcat-admin html title
  64. |--------------------------------------------------------------------------
  65. |
  66. | Html title for all pages.
  67. |
  68. */
  69. 'title' => 'Admin',
  70. /*
  71. |--------------------------------------------------------------------------
  72. | Assets hostname
  73. |--------------------------------------------------------------------------
  74. |
  75. */
  76. 'assets_server' => env('ADMIN_ASSETS_SERVER'),
  77. /*
  78. |--------------------------------------------------------------------------
  79. | Cdn setting
  80. |--------------------------------------------------------------------------
  81. |
  82. */
  83. 'cdn' => env('ADMIN_CDN', false),
  84. /*
  85. |--------------------------------------------------------------------------
  86. | Access via `https`
  87. |--------------------------------------------------------------------------
  88. |
  89. | If your page is going to be accessed via https, set it to `true`.
  90. |
  91. */
  92. 'https' => env('ADMIN_HTTPS', false),
  93. /*
  94. |--------------------------------------------------------------------------
  95. | dcat-admin auth setting
  96. |--------------------------------------------------------------------------
  97. |
  98. | Authentication settings for all admin pages. Include an authentication
  99. | guard and a user provider setting of authentication driver.
  100. |
  101. | You can specify a controller for `login` `logout` and other auth routes.
  102. |
  103. */
  104. 'auth' => [
  105. 'controller' => Dcat\Admin\Controllers\AuthController::class,
  106. 'guard' => 'admin',
  107. 'guards' => [
  108. 'admin' => [
  109. 'driver' => 'session',
  110. 'provider' => 'admin',
  111. ],
  112. ],
  113. 'providers' => [
  114. 'admin' => [
  115. 'driver' => 'eloquent',
  116. 'model' => Dcat\Admin\Models\Administrator::class,
  117. ],
  118. ],
  119. // Add "remember me" to login form
  120. 'remember' => true,
  121. // All method to path like: auth/users/*/edit
  122. // or specific method to path like: get:auth/users.
  123. 'except' => [
  124. 'auth/login',
  125. 'auth/logout',
  126. ],
  127. ],
  128. 'grid' => [
  129. /*
  130. |--------------------------------------------------------------------------
  131. | The global Grid action display class.
  132. |--------------------------------------------------------------------------
  133. */
  134. 'grid_action_class' => Dcat\Admin\Grid\Displayers\DropdownActions::class,
  135. ],
  136. /*
  137. |--------------------------------------------------------------------------
  138. | dcat-admin permission setting
  139. |--------------------------------------------------------------------------
  140. |
  141. | Permission settings for all admin pages.
  142. |
  143. */
  144. 'permission' => [
  145. // Whether enable permission.
  146. 'enable' => true,
  147. // All method to path like: auth/users/*/edit
  148. // or specific method to path like: get:auth/users.
  149. 'except' => [
  150. '/',
  151. 'auth/login',
  152. 'auth/logout',
  153. 'auth/setting',
  154. ],
  155. ],
  156. /*
  157. |--------------------------------------------------------------------------
  158. | dcat-admin menu setting
  159. |--------------------------------------------------------------------------
  160. |
  161. */
  162. 'menu' => [
  163. 'cache' => [
  164. // enable cache or not
  165. 'enable' => true,
  166. 'store' => 'file',
  167. ],
  168. // Whether enable menu bind to a permission.
  169. 'bind_permission' => true,
  170. ],
  171. /*
  172. |--------------------------------------------------------------------------
  173. | dcat-admin upload setting
  174. |--------------------------------------------------------------------------
  175. |
  176. | File system configuration for form upload files and images, including
  177. | disk and upload path.
  178. |
  179. */
  180. 'upload' => [
  181. // Disk in `config/filesystem.php`.
  182. 'disk' => 'admin',
  183. // Image and file upload path under the disk above.
  184. 'directory' => [
  185. 'image' => 'images',
  186. 'file' => 'files',
  187. ],
  188. ],
  189. /*
  190. |--------------------------------------------------------------------------
  191. | dcat-admin database settings
  192. |--------------------------------------------------------------------------
  193. |
  194. | Here are database settings for dcat-admin builtin model & tables.
  195. |
  196. */
  197. 'database' => [
  198. // Database connection for following tables.
  199. 'connection' => '',
  200. // User tables and model.
  201. 'users_table' => 'admin_users',
  202. 'users_model' => Dcat\Admin\Models\Administrator::class,
  203. // Role table and model.
  204. 'roles_table' => 'admin_roles',
  205. 'roles_model' => Dcat\Admin\Models\Role::class,
  206. // Permission table and model.
  207. 'permissions_table' => 'admin_permissions',
  208. 'permissions_model' => Dcat\Admin\Models\Permission::class,
  209. // Menu table and model.
  210. 'menu_table' => 'admin_menu',
  211. 'menu_model' => Dcat\Admin\Models\Menu::class,
  212. // Pivot table for table above.
  213. 'operation_log_table' => 'admin_operation_log',
  214. 'user_permissions_table' => 'admin_user_permissions',
  215. 'role_users_table' => 'admin_role_users',
  216. 'role_permissions_table' => 'admin_role_permissions',
  217. 'role_menu_table' => 'admin_role_menu',
  218. 'permission_menu_table' => 'admin_permission_menu',
  219. ],
  220. /*
  221. |--------------------------------------------------------------------------
  222. | User operation log setting
  223. |--------------------------------------------------------------------------
  224. |
  225. | By setting this option to open or close operation log in dcat-admin.
  226. |
  227. */
  228. 'operation_log' => [
  229. 'enable' => true,
  230. // Only logging allowed methods in the list
  231. 'allowed_methods' => ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH'],
  232. // Routes that will not log to database.
  233. // All method to path like: auth/logs/*/edit
  234. // or specific method to path like: get:auth/logs.
  235. 'except' => [
  236. 'auth/logs*',
  237. ],
  238. ],
  239. /*
  240. |--------------------------------------------------------------------------
  241. | Admin map field provider
  242. |--------------------------------------------------------------------------
  243. |
  244. | Supported: "tencent", "google", "yandex".
  245. |
  246. */
  247. 'map_provider' => 'google',
  248. /*
  249. |--------------------------------------------------------------------------
  250. | Application Skin
  251. |--------------------------------------------------------------------------
  252. |
  253. | This value is the skin of admin pages.
  254. | @see https://adminlte.io/docs/2.4/layout
  255. |
  256. | Supported:
  257. | "skin-blue-light", "skin-black", "skin-black-light".
  258. |
  259. */
  260. 'skin' => 'skin-black',
  261. /*
  262. |--------------------------------------------------------------------------
  263. | Application layout
  264. |--------------------------------------------------------------------------
  265. |
  266. | This value is the layout of admin pages.
  267. | @see https://adminlte.io/docs/2.4/layout
  268. |
  269. | Supported: "fixed", "layout-boxed", "layout-top-nav", "sidebar-collapse",
  270. | "sidebar-mini".
  271. |
  272. */
  273. 'layout' => ['sidebar-mini', 'fixed',],
  274. /*
  275. |--------------------------------------------------------------------------
  276. | Login page background image
  277. |--------------------------------------------------------------------------
  278. |
  279. | This value is used to set the background image of login page.
  280. |
  281. */
  282. 'login_background_image' => '',
  283. /*
  284. |--------------------------------------------------------------------------
  285. | The exception handler class
  286. |--------------------------------------------------------------------------
  287. |
  288. */
  289. 'exception_handler' => \Dcat\Admin\Exception\Handler::class,
  290. /*
  291. |--------------------------------------------------------------------------
  292. | Enable default breadcrumb
  293. |--------------------------------------------------------------------------
  294. |
  295. | Whether enable default breadcrumb for every page content.
  296. */
  297. 'enable_default_breadcrumb' => true,
  298. /*
  299. |--------------------------------------------------------------------------
  300. | Extension Directory
  301. |--------------------------------------------------------------------------
  302. |
  303. | When you use command `php artisan admin:extend` to generate extensions,
  304. | the extension files will be generated in this directory.
  305. */
  306. 'extension_dir' => app_path('Admin/Extensions'),
  307. /*
  308. |--------------------------------------------------------------------------
  309. | Settings for extensions.
  310. |--------------------------------------------------------------------------
  311. |
  312. | You can find all available extensions here
  313. | https://github.com/dcat-admin-extensions.
  314. |
  315. */
  316. 'extensions' => [
  317. ],
  318. ];