1 | <?php |
||
14 | trait Response |
||
15 | { |
||
16 | /** |
||
17 | * Make a JSON response. |
||
18 | * |
||
19 | * @param $statusCode |
||
20 | * |
||
21 | * @return IlluminateJsonResponse |
||
22 | */ |
||
23 | protected function makeJsonResponse($statusCode) |
||
30 | |||
31 | /** |
||
32 | * Make the status code, to respond accordingly. |
||
33 | * |
||
34 | * @return int |
||
35 | */ |
||
36 | 7 | protected function makeStatusCode() |
|
48 | |||
49 | /** |
||
50 | * Make a web response. |
||
51 | * |
||
52 | * @param $statusCode |
||
53 | * |
||
54 | * @return \Illuminate\Http\Response |
||
55 | */ |
||
56 | 7 | protected function makeHtmlResponse($statusCode) |
|
66 | |||
67 | /** |
||
68 | * Create a response to request the OTP. |
||
69 | * |
||
70 | * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse |
||
71 | */ |
||
72 | 7 | public function makeRequestOneTimePasswordResponse() |
|
88 | |||
89 | /** |
||
90 | * Get the OTP view. |
||
91 | * |
||
92 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
||
93 | */ |
||
94 | 7 | private function getView() |
|
98 | |||
99 | abstract protected function getErrorBagForStatusCode($statusCode); |
||
100 | |||
101 | abstract protected function inputHasOneTimePassword(); |
||
102 | |||
103 | abstract public function checkOTP(); |
||
104 | |||
105 | abstract protected function getUser(); |
||
106 | |||
107 | abstract public function getRequest(); |
||
108 | |||
109 | abstract protected function config($string, $children = []); |
||
110 | } |
||
111 |