public function destroy(Page $page, URL $url) { $this->auth($page); if (!$url->isPrimary()) { URLFacade::delete($url); } }
public function testSetIsPrimary() { $url = new URL(['is_primary' => true]); $url->setIsPrimary(false); $this->assertFalse($url->isPrimary()); }