Skip to content

Commit c8209fc

Browse files
authored
Fix backend error when search query is longer than 255 characters
1 parent 3c88b28 commit c8209fc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Http/Controllers/SearchController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ class SearchController
99
{
1010
public function __invoke(Request $request)
1111
{
12+
$request->validate(['q' => 'required|string|max:255']);
13+
1214
$searchQuery = config('rapidez.models.search_query')::firstOrNew([
1315
'query_text' => Str::lower($request->q),
1416
'store_id' => config('rapidez.store'),

0 commit comments

Comments
 (0)