Example #1
0
 /**
  * Create and/or grab the page record
  *
  * @param string $page hash provided by pageId()
  * @return object Page eloquent object.
  */
 private static function createPageIfNotPresent($page)
 {
     if (!isset(self::$current_page)) {
         self::$current_page = Page::firstOrCreate(['page' => $page]);
     }
     return self::$current_page;
 }