Minor performance improvement

Don't bother retrieving the translated URL at construction time, it will be run through the translator during the validation process so there's no need to always hit the translator on every single Page model being loaded.
This commit is contained in:
Luke Towers 2020-03-03 10:38:03 -06:00
parent aff120fcec
commit 8eb045f2d1

View File

@ -56,7 +56,7 @@ class Page extends CmsCompoundObject
parent::__construct($attributes); parent::__construct($attributes);
$this->customMessages = [ $this->customMessages = [
'url.regex' => Lang::get('cms::lang.page.invalid_url') 'url.regex' => 'cms::lang.page.invalid_url',
]; ];
} }