/** * Tracking Urls for Auth.User. * * */ protected function trackingUrls() { if (!auth_check_session()) { return; } $this->trackingToFile('urls', array(\Auth::id(), app('url')->current(), \Route::currentRouteName())); }
public function __destruct() { /** * Caching Html Pages * tweak with Auth::getName() instead of Auth::check() @testing */ if (is_object($this->view) && config('veer.htmlcache_enable') == true && !auth_check_session()) { app('veer')->cachedView = $this->view; } }
public function fire($job, $data) { if (isset(app('veer')->cachedView) && config('veer.htmlcache_enable') == true && !auth_check_session()) { $cache_url = cache_current_url_value(); $expiresAt = now(24, 'hours'); \Cache::has($cache_url) ?: \Cache::add($cache_url, app('veer')->cachedView->render(), $expiresAt); } else { return $job->release(); } // leave it here if (isset($data['repeatJob']) && $data['repeatJob'] > 0) { $job->release($data['repeatJob'], 'minutes'); } }
/** * Store a newly created resource in storage. */ public function store() { if (\Input::has('q')) { $q = trim(\Input::get('q')); if (!empty($q)) { $search = \Veer\Models\Search::firstOrCreate(array("q" => $q)); $search->increment('times'); $search->save(); if (auth_check_session()) { $search->users()->attach(\Auth::id()); } return $this->results($this->showSearch->getSearchResultsWithSite(app('veer')->siteId, $q, get_paginator_and_sorting())); } } return $this->index(); }