Ejemplo n.º 1
0
 /**
  * @param string $location
  *
  * @return URLInterface
  */
 public function findByLocation($location)
 {
     return $this->model->where('location', '=', URLHelper::sanitise($location))->first();
 }
Ejemplo n.º 2
0
 /**
  * Returns the primary URL for the given page.
  *
  * @param PageInterface $page
  *
  * @return URLInterface
  */
 public function page(PageInterface $page)
 {
     return $this->model->where(Model::ATTR_PAGE_ID, '=', $page->getId())->where(Model::ATTR_IS_PRIMARY, '=', true)->first();
 }