Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php namespace Arcanesoft\Seo\Http\Requests\Admin\Footers; |
||
23 | protected function getPageRule() |
||
24 | { |
||
25 | $existsRule = Rule::exists($this->getTablePrefix().'pages', 'id'); |
||
26 | |||
27 | if ($this->has('locale')) |
||
28 | $existsRule = $existsRule->where('locale', $this->get('locale', config('app.locale'))); |
||
29 | |||
30 | return ['required', 'integer', $existsRule]; |
||
31 | } |
||
32 | |||
43 |