Exemplo n.º 1
0
 private function isLoggableEvent($event)
 {
     $forbidden = $this->config->get('do_not_log_events');
     // Illuminate Query may cause infinite recursion
     $forbidden[] = 'illuminate.query';
     return $event['event'] != $this->getObject($event['object']) && !in_array_wildcard($event['event'], $forbidden) && !$this->config->get('log_only_events') || in_array($event['event'], $this->config->get('log_only_events'));
 }
Exemplo n.º 2
0
 public function isTrackable($route)
 {
     $forbidden = $this->config->get('do_not_track_routes');
     return !$forbidden || !$route->currentRouteName() || !in_array_wildcard($route->currentRouteName(), $forbidden);
 }
function resolveShortURL($url)
{
    $ch = curl_init("{$url}");
    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $yy = curl_exec($ch);
    curl_close($ch);
    $w = explode("\n", $yy);
    // Want to print the header array? Uncomment below.
    // print_r($w);
    $TheShortURL = in_array_wildcard('Location', $w);
    $url = $TheShortURL[0];
    $url = str_replace("Location:", "", "{$url}");
    $url = trim("{$url}");
    return $url;
}