admin.php 10 KB

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