| Conditions | 5 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 5 | ||
| Bugs | 2 | Features | 1 |
| 1 | <?php |
||
| 15 | public function getGetSeoTitleAttribute() |
||
| 16 | { |
||
| 17 | $cache_key = sha1('getGetSeoTitleAttribute'.$this->id.$this->config->name); |
||
| 18 | |||
| 19 | return Cache::rememberForever($cache_key, function () { |
||
| 20 | if (($get_seo = Seo::whereSeoUrlConnect($this->url)->whereSeoTypeConnect($this->config->name)->first()) && $get_seo->seo_title) { |
||
| 21 | return $get_seo->seo_title; |
||
| 22 | } |
||
| 23 | if (($get_seo = Seo::whereSeoIdConnect($this->id)->whereSeoTypeConnect($this->config->name)->first()) && $get_seo->seo_title) { |
||
| 24 | return $get_seo->seo_title; |
||
| 25 | } |
||
| 26 | |||
| 27 | return $this->title; |
||
| 28 | }); |
||
| 31 |