| Total Complexity | 3 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class SearchRequest extends FormRequest |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Can user view the search section? |
||
| 14 | */ |
||
| 15 | public function authorize(): bool |
||
| 16 | { |
||
| 17 | return true === config('blogetc.search.search_enabled'); |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Get the validation rules that apply to the request. |
||
| 22 | */ |
||
| 23 | public function rules(): array |
||
| 27 | ]; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Return the query that user searched for. |
||
| 32 | */ |
||
| 33 | public function searchQuery(): string |
||
| 36 | } |
||
| 37 | } |
||
| 38 |