Skip to content

Commit

Permalink
Set meta title default value on generic title set
Browse files Browse the repository at this point in the history
  • Loading branch information
eusonlito committed May 19, 2018
1 parent a4ef380 commit ab83524
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Eusonlito/LaravelMeta/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ public function title($title = null)
return $this->title;
}

return $this->title = $this->plain($title);
$title = $this->plain($title);

if (empty($this->metas['title'])) {
$this->metas['title'] = $title;
}

return $this->title = $title;
}

/**
Expand Down

0 comments on commit ab83524

Please # to comment.