forked from garygreen/pretty-routes
-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpretty-routes.php
155 lines (123 loc) · 3.67 KB
/
pretty-routes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
/**
* This file is part of the "dragon-code/pretty-routes" project.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Andrey Helldar <[email protected]>
* @copyright 2024 Andrey Helldar
* @license MIT
*
* @see https://github.com/TheDragonCode/pretty-routes
*/
return [
// The endpoint to access the routes.
'url' => 'routes',
// The middleware(s) to apply before attempting to access routes pages (web + api).
'middlewares' => [],
/*
* The middleware(s) to apply before attempting to access WEB route page.
*
* Also routes for WEB will be determined by this value.
*/
'web_middleware' => 'web',
/*
* The middleware(s) to apply before attempting to access API route.
*
* Also routes for API will be determined by this value.
*/
'api_middleware' => 'api',
// Indicates whether to enable pretty routes only when debug is enabled (APP_DEBUG).
'debug_only' => true,
// The methods to hide.
'hide_methods' => [
'HEAD',
],
// The routes to hide with regular expression
'hide_matching' => [
'#^__clockwork#',
'#^_debugbar#',
'#^_ignition#',
'#^horizon#',
'#^routes#',
'#^sanctum#',
'#^telescope#',
],
/*
* Set a light or dark themes.
*
* Available:
* light - always chooses a light theme.
* dark - always chooses a dark theme.
* auto - automatic theme detection from browser.
*
* By default, auto.
*/
'color_scheme' => 'auto',
/*
* Apply color theme when idle time or active.
*
* If your browser theme following any specific condition (os, time etc.) helps to auto theme switch.
*
* 1000 ms = 1 seconds
*
* This option depends to "color_scheme" and works only with "auto"
*
* By default, 1000 and accepts only integer values.
*/
'color_scheme_idle_time' => 1000,
/*
* Auto reload table contents when return back.
*
* 1000 ms = 1 seconds
*
* 0 = disabled
*
* By default, 10000 and accepts only integer values.
*/
'table_reload_idle_time' => 10000,
/*
* If routes are not separated by a domain, this column is hidden from display by default.
*
* If you want to always show the column with the domain name, set the value to "true".
*
* By default, false.
*/
'domain_force' => false,
/*
* In the case when you need to use a specific localization, set its name to the value.
*
* For example "de".
*
* Otherwise, leave the value "false".
*/
'locale_force' => false,
/*
* Enable open link in new tab.
*
* Useful for manual testing or visual checks.
*
* This option related with "dummy_variable_prefix"
*/
'show_path_link' => true,
/*
* Laravel stores variable names with curly bracktes, this option replaces "prefix" and "variable name".
* So we can prevent url encode when browsing and we can get readable urls
*
* For example
* before admin/line/lines/{line_id} => admin/line/lines/%7Bline_id%7D
* after: admin/line/lines/{line_id} => admin/line/lines/param_line_id
*
* This option depends to "show_path_link"
*/
'dummy_variable_prefix' => 'param_',
// Click and copy to clipboard "path" and "name" text.
'click_and_copy' => true,
/*
* Double click and copy to clipboard "path" and "name" text.
*
* This option overwrites "click_and_copy" option.
*/
'double_click_and_copy' => true,
];