src/FacebookLocationDriver.php
public function getLocation(array $messages)
    {
        $data = Collection::make($messages['message']['attachments'])->where('type',
            'location')->pluck('payload')->first();

        return new Location($data['coordinates']['lat'], $data['coordinates']['long'], $data);
    }
public function getLocation(array $messages)
    {
        $data = Collection::make($messages['message']['attachments'])->where('type',
            'location')->pluck('payload')->first();

        return new Location($data['coordinates']['lat'], $data['coordinates']['long'], $data);
    }
public function getLocation ( array $ messages ) { $ data = Collection :: make ( $ messages [ 'message' ] [ 'attachments' ] ) -> where ( 'type' , 'location' ) -> pluck ( 'payload' ) -> first ( ) ; return new Location ( $ data [ 'coordinates' ] [ 'lat' ] , $ data [ 'coordinates' ] [ 'long' ] , $ data ) ; }
Retrieve location from an incoming message.

@param array $messages
@return \BotMan\BotMan\Messages\Attachments\Location
Retrieve location from an incoming message .