Edit File: SearchHistoryController.php
<?php namespace App\Http\Controllers\Api\User; use App\Http\Controllers\Controller; use App\Services\User\SearchHistoryService; use App\Traits\ResponseTrait; class SearchHistoryController extends Controller { use ResponseTrait; protected $searchHistoryService; public function __construct(SearchHistoryService $searchHistoryService) { $this->searchHistoryService = $searchHistoryService; } public function searchHistory() { $data = $this->searchHistoryService->index(); return $this->successData($data); } public function deleteSearchHistory($id) { $data = $this->searchHistoryService->deleteSearchHistory($id); return $this->response($data['key'], $data['msg']); } public function emptySearchHistory() { $data = $this->searchHistoryService->emptySearchHistory(); return $this->response($data['key'], $data['msg']); } }
Back to File Manager