public function getBranchUrlAttribute($alternative = null)
{
$info = $this->accessDetails();
if (isset($info['domain']) && isset($info['reference'])) {
$path = 'tree';
if (preg_match('/bitbucket/', $info['domain'])) {
$path = 'commits/branch';
}
$branch = is_null($alternative) ? $this->branch : $alternative;
return 'http://' . $info['domain'] . '/' . $info['reference'] . '/' . $path . '/' . $branch;
}
return false;
}