Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

filament.php 10.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <?php
  2. use App\Http\Middleware\Authenticate;
  3. use Filament\Http\Middleware\DispatchServingFilamentEvent;
  4. use Filament\Http\Middleware\MirrorConfigToSubpackages;
  5. use Filament\Pages;
  6. use Filament\Widgets;
  7. use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
  8. use Illuminate\Cookie\Middleware\EncryptCookies;
  9. use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
  10. use Illuminate\Routing\Middleware\SubstituteBindings;
  11. use Wallo\FilamentCompanies\Http\Middleware\AuthenticateSession;
  12. use Illuminate\Session\Middleware\StartSession;
  13. use Illuminate\View\Middleware\ShareErrorsFromSession;
  14. return [
  15. /*
  16. |--------------------------------------------------------------------------
  17. | Filament Path
  18. |--------------------------------------------------------------------------
  19. |
  20. | The default is `admin` but you can change it to whatever works best and
  21. | doesn't conflict with the routing in your application.
  22. |
  23. */
  24. 'path' => env('FILAMENT_PATH', 'admin'),
  25. /*
  26. |--------------------------------------------------------------------------
  27. | Filament Core Path
  28. |--------------------------------------------------------------------------
  29. |
  30. | This is the path which Filament will use to load its core routes and assets.
  31. | You may change it if it conflicts with your other routes.
  32. |
  33. */
  34. 'core_path' => env('FILAMENT_CORE_PATH', 'filament'),
  35. /*
  36. |--------------------------------------------------------------------------
  37. | Filament Domain
  38. |--------------------------------------------------------------------------
  39. |
  40. | You may change the domain where Filament should be active. If the domain
  41. | is empty, all domains will be valid.
  42. |
  43. */
  44. 'domain' => env('FILAMENT_DOMAIN'),
  45. /*
  46. |--------------------------------------------------------------------------
  47. | Homepage URL
  48. |--------------------------------------------------------------------------
  49. |
  50. | This is the URL that Filament will redirect the user to when they click
  51. | on the sidebar's header.
  52. |
  53. */
  54. 'home_url' => '/',
  55. /*
  56. |--------------------------------------------------------------------------
  57. | Brand Name
  58. |--------------------------------------------------------------------------
  59. |
  60. | This will be displayed on the login page and in the sidebar's header.
  61. |
  62. */
  63. 'brand' => env('APP_NAME'),
  64. /*
  65. |--------------------------------------------------------------------------
  66. | Auth
  67. |--------------------------------------------------------------------------
  68. |
  69. | This is the configuration that Filament will use to handle authentication
  70. | into the admin panel.
  71. |
  72. */
  73. 'auth' => [
  74. 'guard' => env('FILAMENT_AUTH_GUARD', 'web'),
  75. 'pages' => [
  76. 'login' => null,
  77. ],
  78. ],
  79. /*
  80. |--------------------------------------------------------------------------
  81. | Pages
  82. |--------------------------------------------------------------------------
  83. |
  84. | This is the namespace and directory that Filament will automatically
  85. | register pages from. You may also register pages here.
  86. |
  87. */
  88. 'pages' => [
  89. 'namespace' => 'App\\Filament\\Pages',
  90. 'path' => app_path('Filament/Pages'),
  91. 'register' => [
  92. //
  93. ],
  94. ],
  95. /*
  96. |--------------------------------------------------------------------------
  97. | Resources
  98. |--------------------------------------------------------------------------
  99. |
  100. | This is the namespace and directory that Filament will automatically
  101. | register resources from. You may also register resources here.
  102. |
  103. */
  104. 'resources' => [
  105. 'namespace' => 'App\\Filament\\Resources',
  106. 'path' => app_path('Filament/Resources'),
  107. 'register' => [],
  108. ],
  109. /*
  110. |--------------------------------------------------------------------------
  111. | Widgets
  112. |--------------------------------------------------------------------------
  113. |
  114. | This is the namespace and directory that Filament will automatically
  115. | register dashboard widgets from. You may also register widgets here.
  116. |
  117. */
  118. 'widgets' => [
  119. 'namespace' => 'App\\Filament\\Widgets',
  120. 'path' => app_path('Filament/Widgets'),
  121. 'register' => [
  122. Widgets\AccountWidget::class,
  123. Widgets\FilamentInfoWidget::class,
  124. ],
  125. ],
  126. /*
  127. |--------------------------------------------------------------------------
  128. | Livewire
  129. |--------------------------------------------------------------------------
  130. |
  131. | This is the namespace and directory that Filament will automatically
  132. | register Livewire components inside.
  133. |
  134. */
  135. 'livewire' => [
  136. 'namespace' => 'App\\Filament',
  137. 'path' => app_path('Filament'),
  138. ],
  139. /*
  140. |--------------------------------------------------------------------------
  141. | Dark mode
  142. |--------------------------------------------------------------------------
  143. |
  144. | By enabling this feature, your users are able to select between a light
  145. | and dark appearance for the admin panel, or let their system decide.
  146. |
  147. */
  148. 'dark_mode' => true,
  149. /*
  150. |--------------------------------------------------------------------------
  151. | Database notifications
  152. |--------------------------------------------------------------------------
  153. |
  154. | By enabling this feature, your users are able to open a slide-over within
  155. | the admin panel to view their database notifications.
  156. |
  157. */
  158. 'database_notifications' => [
  159. 'enabled' => false,
  160. 'polling_interval' => '30s',
  161. ],
  162. /*
  163. |--------------------------------------------------------------------------
  164. | Broadcasting
  165. |--------------------------------------------------------------------------
  166. |
  167. | By uncommenting the Laravel Echo configuration, you may connect your
  168. | admin panel to any Pusher-compatible websockets server.
  169. |
  170. | This will allow your admin panel to receive real-time notifications.
  171. |
  172. */
  173. 'broadcasting' => [
  174. // 'echo' => [
  175. // 'broadcaster' => 'pusher',
  176. // 'key' => env('VITE_PUSHER_APP_KEY'),
  177. // 'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
  178. // 'forceTLS' => true,
  179. // ],
  180. ],
  181. /*
  182. |--------------------------------------------------------------------------
  183. | Layout
  184. |--------------------------------------------------------------------------
  185. |
  186. | This is the configuration for the general layout of the admin panel.
  187. |
  188. | You may configure the max content width from `xl` to `7xl`, or `full`
  189. | for no max width.
  190. |
  191. */
  192. 'layout' => [
  193. 'actions' => [
  194. 'modal' => [
  195. 'actions' => [
  196. 'alignment' => 'left',
  197. ],
  198. ],
  199. ],
  200. 'forms' => [
  201. 'actions' => [
  202. 'alignment' => 'left',
  203. 'are_sticky' => false,
  204. ],
  205. 'have_inline_labels' => false,
  206. ],
  207. 'footer' => [
  208. 'should_show_logo' => false,
  209. ],
  210. 'max_content_width' => null,
  211. 'notifications' => [
  212. 'vertical_alignment' => 'top',
  213. 'alignment' => 'center',
  214. ],
  215. 'sidebar' => [
  216. 'is_collapsible_on_desktop' => true,
  217. 'groups' => [
  218. 'are_collapsible' => true,
  219. ],
  220. 'width' => null,
  221. 'collapsed_width' => null,
  222. ],
  223. ],
  224. /*
  225. |--------------------------------------------------------------------------
  226. | Favicon
  227. |--------------------------------------------------------------------------
  228. |
  229. | This is the path to the favicon used for pages in the admin panel.
  230. |
  231. */
  232. 'favicon' => null,
  233. /*
  234. |--------------------------------------------------------------------------
  235. | Default Avatar Provider
  236. |--------------------------------------------------------------------------
  237. |
  238. | This is the service that will be used to retrieve default avatars if one
  239. | has not been uploaded.
  240. |
  241. */
  242. 'default_avatar_provider' => \Filament\AvatarProviders\UiAvatarsProvider::class,
  243. /*
  244. |--------------------------------------------------------------------------
  245. | Default Filesystem Disk
  246. |--------------------------------------------------------------------------
  247. |
  248. | This is the storage disk Filament will use to put media. You may use any
  249. | of the disks defined in the `config/filesystems.php`.
  250. |
  251. */
  252. 'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DRIVER', 'public'),
  253. /*
  254. |--------------------------------------------------------------------------
  255. | Google Fonts
  256. |--------------------------------------------------------------------------
  257. |
  258. | This is the URL for Google Fonts that should be loaded. You may use any
  259. | font, or set to `null` to prevent any Google Fonts from loading.
  260. |
  261. | When using a custom font, you should also set the font family in your
  262. | custom theme's `tailwind.config.js` file.
  263. |
  264. */
  265. 'google_fonts' => 'https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap',
  266. /*
  267. |--------------------------------------------------------------------------
  268. | Middleware
  269. |--------------------------------------------------------------------------
  270. |
  271. | You may customize the middleware stack that Filament uses to handle
  272. | requests.
  273. |
  274. */
  275. 'middleware' => [
  276. 'auth' => [
  277. Authenticate::class,
  278. ],
  279. 'base' => [
  280. EncryptCookies::class,
  281. AddQueuedCookiesToResponse::class,
  282. StartSession::class,
  283. AuthenticateSession::class,
  284. ShareErrorsFromSession::class,
  285. VerifyCsrfToken::class,
  286. SubstituteBindings::class,
  287. DispatchServingFilamentEvent::class,
  288. MirrorConfigToSubpackages::class,
  289. ],
  290. ],
  291. ];