koel/app/Http/Controllers/API/ExcerptSearchController.php
2024-07-06 17:45:11 +02:00

16 lines
437 B
PHP

<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Http\Requests\API\SearchRequest;
use App\Http\Resources\ExcerptSearchResource;
use App\Services\SearchService;
class ExcerptSearchController extends Controller
{
public function __invoke(SearchRequest $request, SearchService $searchService)
{
return ExcerptSearchResource::make($searchService->excerptSearch($request->q));
}
}