コード例 #1
0
ファイル: MakeURLPrimary.php プロジェクト: boomcms/boom-core
 public function handle()
 {
     DB::table('page_urls')->where('page_id', '=', $this->url->getPageId())->where('id', '!=', $this->url->getId())->where('is_primary', '=', true)->update(['is_primary' => false]);
     $this->url->setPrimary(true);
     URLFacade::save($this->url);
     DB::table('pages')->where('id', '=', $this->url->getPageId())->update(['primary_uri' => $this->url->getLocation()]);
 }
コード例 #2
0
ファイル: ReassignURL.php プロジェクト: robbytaylor/boom-core
 public function handle()
 {
     $this->url->setPageId($this->page->getId())->setIsPrimary(false);
     URLFacade::save($this->url);
 }
コード例 #3
0
ファイル: URL.php プロジェクト: robbytaylor/boom-core
 /**
  * @param URLInterface $url
  *
  * @return URLInterface
  */
 public function save(URLInterface $url)
 {
     return $url->save();
 }