コード例 #1
0
 public function intent()
 {
     foreach ($this->alexa->session() as $key => $val) {
         \Log::info('key: ' . $key . ' | val: ' . $val);
     }
     foreach (\Input::all() as $key => $val) {
         \Log::info('key: ' . $key . ' | val: ' . $val);
     }
 }
コード例 #2
0
ファイル: AlexaResponse.php プロジェクト: develpr/alexa-app
 /**
  * @return array|mixed|null
  */
 private function getSessionData()
 {
     $data = $this->alexa->session();
     if ($this->isPrompt()) {
         $data['possible_prompt_response'] = true;
         if ($this->promptResponseIntent) {
             $data['prompt_response_intent'] = $this->promptResponseIntent;
         }
         if ($this->speech) {
             $data['original_prompt'] = $this->speech->getValue();
         }
         if ($this->alexa->requestType() === 'IntentRequest') {
             $data['original_prompt_intent'] = $this->alexa->request()->getIntent();
         }
     }
     return $data;
 }