admin.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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 bootstrap setting
  37. |--------------------------------------------------------------------------
  38. |
  39. | This value is the path of laravel-admin bootstrap file.
  40. |
  41. */
  42. 'bootstrap' => app_path('Admin/bootstrap.php'),
  43. /*
  44. |--------------------------------------------------------------------------
  45. | Laravel-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. | Laravel-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. | Laravel-admin html title
  72. |--------------------------------------------------------------------------
  73. |
  74. | Html title for all pages.
  75. |
  76. */
  77. 'title' => 'Admin',
  78. /*
  79. |--------------------------------------------------------------------------
  80. | Access via `https`
  81. |--------------------------------------------------------------------------
  82. |
  83. | If your page is going to be accessed via https, set it to `true`.
  84. |
  85. */
  86. 'https' => env('ADMIN_HTTPS', false),
  87. /*
  88. |--------------------------------------------------------------------------
  89. | Laravel-admin auth setting
  90. |--------------------------------------------------------------------------
  91. |
  92. | Authentication settings for all admin pages. Include an authentication
  93. | guard and a user provider setting of authentication driver.
  94. |
  95. | You can specify a controller for `login` `logout` and other auth routes.
  96. |
  97. */
  98. 'auth' => [
  99. 'controller' => App\Admin\Controllers\AuthController::class,
  100. 'guard' => 'admin',
  101. 'guards' => [
  102. 'admin' => [
  103. 'driver' => 'session',
  104. 'provider' => 'admin',
  105. ],
  106. ],
  107. 'providers' => [
  108. 'admin' => [
  109. 'driver' => 'eloquent',
  110. 'model' => Encore\Admin\Auth\Database\Administrator::class,
  111. ],
  112. ],
  113. // Add "remember me" to login form
  114. 'remember' => true,
  115. // Redirect to the specified URI when user is not authorized.
  116. 'redirect_to' => 'auth/login',
  117. // The URIs that should be excluded from authorization.
  118. 'excepts' => [
  119. 'auth/login',
  120. 'auth/logout',
  121. ],
  122. ],
  123. /*
  124. |--------------------------------------------------------------------------
  125. | Laravel-admin upload setting
  126. |--------------------------------------------------------------------------
  127. |
  128. | File system configuration for form upload files and images, including
  129. | disk and upload path.
  130. |
  131. */
  132. 'upload' => [
  133. // Disk in `config/filesystem.php`.
  134. 'disk' => 'admin',
  135. // Image and file upload path under the disk above.
  136. 'directory' => [
  137. 'image' => 'images',
  138. 'file' => 'files',
  139. ],
  140. ],
  141. /*
  142. |--------------------------------------------------------------------------
  143. | Laravel-admin database settings
  144. |--------------------------------------------------------------------------
  145. |
  146. | Here are database settings for laravel-admin builtin model & tables.
  147. |
  148. */
  149. 'database' => [
  150. // Database connection for following tables.
  151. 'connection' => '',
  152. // User tables and model.
  153. 'users_table' => 'admin_users',
  154. 'users_model' => Encore\Admin\Auth\Database\Administrator::class,
  155. // Role table and model.
  156. 'roles_table' => 'admin_roles',
  157. 'roles_model' => Encore\Admin\Auth\Database\Role::class,
  158. // Permission table and model.
  159. 'permissions_table' => 'admin_permissions',
  160. 'permissions_model' => Encore\Admin\Auth\Database\Permission::class,
  161. // Menu table and model.
  162. 'menu_table' => 'admin_menu',
  163. 'menu_model' => Encore\Admin\Auth\Database\Menu::class,
  164. // Pivot table for table above.
  165. 'operation_log_table' => 'admin_operation_log',
  166. 'user_permissions_table' => 'admin_user_permissions',
  167. 'role_users_table' => 'admin_role_users',
  168. 'role_permissions_table' => 'admin_role_permissions',
  169. 'role_menu_table' => 'admin_role_menu',
  170. ],
  171. /*
  172. |--------------------------------------------------------------------------
  173. | User operation log setting
  174. |--------------------------------------------------------------------------
  175. |
  176. | By setting this option to open or close operation log in laravel-admin.
  177. |
  178. */
  179. 'operation_log' => [
  180. 'enable' => true,
  181. /*
  182. * Only logging allowed methods in the list
  183. */
  184. 'allowed_methods' => ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH'],
  185. /*
  186. * Routes that will not log to database.
  187. *
  188. * All method to path like: admin/auth/logs
  189. * or specific method to path like: get:admin/auth/logs.
  190. */
  191. 'except' => [
  192. 'admin/auth/logs*',
  193. ],
  194. ],
  195. /*
  196. |--------------------------------------------------------------------------
  197. | Indicates whether to check route permission.
  198. |--------------------------------------------------------------------------
  199. */
  200. 'check_route_permission' => true,
  201. /*
  202. |--------------------------------------------------------------------------
  203. | Indicates whether to check menu roles.
  204. |--------------------------------------------------------------------------
  205. */
  206. 'check_menu_roles' => true,
  207. /*
  208. |--------------------------------------------------------------------------
  209. | User default avatar
  210. |--------------------------------------------------------------------------
  211. |
  212. | Set a default avatar for newly created users.
  213. |
  214. */
  215. 'default_avatar' => '/vendor/laravel-admin/AdminLTE/dist/img/user2-160x160.jpg',
  216. /*
  217. |--------------------------------------------------------------------------
  218. | Admin map field provider
  219. |--------------------------------------------------------------------------
  220. |
  221. | Supported: "tencent", "google", "yandex".
  222. |
  223. */
  224. 'map_provider' => 'google',
  225. /*
  226. |--------------------------------------------------------------------------
  227. | Application Skin
  228. |--------------------------------------------------------------------------
  229. |
  230. | This value is the skin of admin pages.
  231. | @see https://adminlte.io/docs/2.4/layout
  232. |
  233. | Supported:
  234. | "skin-blue", "skin-blue-light", "skin-yellow", "skin-yellow-light",
  235. | "skin-green", "skin-green-light", "skin-purple", "skin-purple-light",
  236. | "skin-red", "skin-red-light", "skin-black", "skin-black-light".
  237. |
  238. */
  239. 'skin' => 'skin-blue-light',
  240. /*
  241. |--------------------------------------------------------------------------
  242. | Application layout
  243. |--------------------------------------------------------------------------
  244. |
  245. | This value is the layout of admin pages.
  246. | @see https://adminlte.io/docs/2.4/layout
  247. |
  248. | Supported: "fixed", "layout-boxed", "layout-top-nav", "sidebar-collapse",
  249. | "sidebar-mini".
  250. |
  251. */
  252. 'layout' => ['sidebar-mini', 'sidebar-collapse'],
  253. /*
  254. |--------------------------------------------------------------------------
  255. | Login page background image
  256. |--------------------------------------------------------------------------
  257. |
  258. | This value is used to set the background image of login page.
  259. |
  260. */
  261. 'login_background_image' => '',
  262. /*
  263. |--------------------------------------------------------------------------
  264. | Show version at footer
  265. |--------------------------------------------------------------------------
  266. |
  267. | Whether to display the version number of laravel-admin at the footer of
  268. | each page
  269. |
  270. */
  271. 'show_version' => true,
  272. /*
  273. |--------------------------------------------------------------------------
  274. | Show environment at footer
  275. |--------------------------------------------------------------------------
  276. |
  277. | Whether to display the environment at the footer of each page
  278. |
  279. */
  280. 'show_environment' => true,
  281. /*
  282. |--------------------------------------------------------------------------
  283. | Menu bind to permission
  284. |--------------------------------------------------------------------------
  285. |
  286. | whether enable menu bind to a permission
  287. */
  288. 'menu_bind_permission' => true,
  289. /*
  290. |--------------------------------------------------------------------------
  291. | Enable default breadcrumb
  292. |--------------------------------------------------------------------------
  293. |
  294. | Whether enable default breadcrumb for every page content.
  295. */
  296. 'enable_default_breadcrumb' => true,
  297. /*
  298. |--------------------------------------------------------------------------
  299. | Enable/Disable assets minify
  300. |--------------------------------------------------------------------------
  301. */
  302. 'minify_assets' => [
  303. // Assets will not be minified.
  304. 'excepts' => [
  305. ],
  306. ],
  307. /*
  308. |--------------------------------------------------------------------------
  309. | Enable/Disable sidebar menu search
  310. |--------------------------------------------------------------------------
  311. */
  312. 'enable_menu_search' => true,
  313. /*
  314. |--------------------------------------------------------------------------
  315. | Alert message that will displayed on top of the page.
  316. |--------------------------------------------------------------------------
  317. */
  318. 'top_alert' => '',
  319. /*
  320. |--------------------------------------------------------------------------
  321. | The global Grid action display class.
  322. |--------------------------------------------------------------------------
  323. */
  324. 'grid_action_class' => \Encore\Admin\Grid\Displayers\DropdownActions::class,
  325. /*
  326. |--------------------------------------------------------------------------
  327. | Extension Directory
  328. |--------------------------------------------------------------------------
  329. |
  330. | When you use command `php artisan admin:extend` to generate extensions,
  331. | the extension files will be generated in this directory.
  332. */
  333. 'extension_dir' => app_path('Admin/Extensions'),
  334. /*
  335. |--------------------------------------------------------------------------
  336. | Settings for extensions.
  337. |--------------------------------------------------------------------------
  338. |
  339. | You can find all available extensions here
  340. | https://github.com/laravel-admin-extensions.
  341. |
  342. */
  343. 'extensions' => [
  344. ],
  345. ];