Slide 33
Slide 33 text
3. LINEBot作成
33
n Laravelでの実装⽅法(コントローラ)
< app/controllers/LineWebhookController>
<⼤切な部分>
$httpClient = new CurlHTTPClient(config('line.line_channel_access_token'));
$bot = new LINEBot($httpClient, ['channelSecret' => config('line.line_channel_secret')]);
$signature = $request->header(HTTPHeader::LINE_SIGNATURE);
$events = $bot->parseEventRequest($request->getContent(), $signature);