File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 77 * file that was distributed with this source code.
88 */
99
10+ /// <reference path="./container.ts" />
1011/// <reference path="./context.ts" />
1112/// <reference path="./http-server.ts" />
1213/// <reference path="./middleware.ts" />
13- /// <reference path="./route.ts" />
1414/// <reference path="./request.ts" />
1515/// <reference path="./response.ts" />
16+ /// <reference path="./route.ts" />
Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ declare module '@ioc:Adonis/Core/Request' {
7474 */
7575 updateQs ( data : any ) : void
7676
77+ /**
78+ * Returns route params
79+ */
80+ params ( ) : { [ key : string ] : any }
81+
7782 /**
7883 * Returns reference to the query string object
7984 */
@@ -118,6 +123,19 @@ declare module '@ioc:Adonis/Core/Request' {
118123 */
119124 input ( key : string , defaultValue ?: any ) : any
120125
126+ /**
127+ * Returns value for a given key from route params
128+ *
129+ * @example
130+ * ```js
131+ * request.param('id')
132+ *
133+ * // with default value
134+ * request.param('id', 1)
135+ * ```
136+ */
137+ param ( key : string , defaultValue ?: any ) : any
138+
121139 /**
122140 * Get everything from the request body except the given keys.
123141 *
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ <h5 class="card-title">
5555 < div class ="card ">
5656 < div class ="card-body ">
5757 < h5 class ="card-title ">
58- September 27th 2020, 1:46:46 pm
58+ September 27th 2020, 4:36:19 pm
5959 </ h5 >
6060 < p class ="card-text "> Last updated</ p >
6161 </ div >
You can’t perform that action at this time.
0 commit comments