1 | <?php |
||
10 | class AppServiceProvider extends ServiceProvider |
||
11 | { |
||
12 | /** |
||
13 | * Bootstrap any application services. |
||
14 | * |
||
15 | * @return void |
||
16 | */ |
||
17 | public function boot() |
||
21 | |||
22 | /** |
||
23 | * Set locale for Carbon. |
||
24 | * |
||
25 | * @return bool |
||
26 | */ |
||
27 | protected function setLocaleForCarbon() |
||
33 | |||
34 | /** |
||
35 | * Register any application services. |
||
36 | * |
||
37 | * @return void |
||
38 | */ |
||
39 | public function register() |
||
45 | |||
46 | /** |
||
47 | * Get service providers to be registered. |
||
48 | * |
||
49 | * @return array |
||
50 | */ |
||
51 | protected function getServiceProviders() |
||
65 | |||
66 | /** |
||
67 | * Modify the current request. |
||
68 | * |
||
69 | * @return void |
||
70 | */ |
||
71 | protected function modifyCurrentRequest() |
||
81 | |||
82 | /** |
||
83 | * Determines appending JSON type to the "Accept" header for the current request. |
||
84 | * |
||
85 | * @param \Illuminate\Http\Request $request |
||
86 | * @return bool |
||
87 | */ |
||
88 | protected function shouldAddAcceptableJsonType(Request $request) |
||
92 | |||
93 | /** |
||
94 | * Indicates the current request is an API request, e.g. the request is sent |
||
95 | * from an API client. |
||
96 | * |
||
97 | * @return bool |
||
98 | */ |
||
99 | protected function isApiRequest() |
||
103 | |||
104 | /** |
||
105 | * Determines making a fake API client for the current request. |
||
106 | * |
||
107 | * @return bool |
||
108 | */ |
||
109 | protected function shouldFakeAppClient() |
||
116 | |||
117 | /** |
||
118 | * Fake current agent client as an app client. |
||
119 | * |
||
120 | * @return void |
||
121 | */ |
||
122 | protected function fakeAppClient() |
||
140 | |||
141 | /** |
||
142 | * Get User-Agent string for faking app client. |
||
143 | * |
||
144 | * @return string |
||
145 | */ |
||
146 | protected function getUserAgentForFakingAppClient() |
||
156 | |||
157 | /** |
||
158 | * Get API token request headers for faking app client. |
||
159 | * |
||
160 | * @return array |
||
161 | */ |
||
162 | protected function getApiTokenHeadersForFakingAppClient() |
||
176 | } |
||
177 |