function asset_exists($path)
{
    // LATER: Optimize for multiple calls to this method in a single request
    $exists = is_file(asset_path($path));
    if (!$exists) {
        Log::critical('Image not found: ' . $path . '. May need to upload it.');
    }
    return $exists;
}
 private function getHomepage()
 {
     $homepage = null;
     try {
         $site = \Site::current();
         $homepage = $site->pages->where('is_home', 1)->first();
     } catch (\Exception $e) {
         Log::critical($e);
     }
     return $homepage;
 }
 /**
  * Critical conditions.
  *
  * Example: Application component unavailable, unexpected exception.
  *
  * @param string $message
  * @param array $context
  *
  * @return bool
  */
 public function critical($message, array $context = [])
 {
     return Log::critical($message, $context);
 }
Exemple #4
0
 /**
  * @param        $data
  * @param array  $contextualData
  * @param array  $location
  */
 public static function critical($data, array $location = [], array $contextualData = [])
 {
     $msg = self::renderMessage($data, $location);
     /** @noinspection PhpUndefinedMethodInspection */
     BaseLog::critical($msg, $contextualData);
 }