Commit dd000b3d by Arpit Jain

Worked on rating drop down selected and also completed review point

parent 728070f7
......@@ -3,7 +3,6 @@
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Homepage;
use App\Helpers\Apihelpers;
use App\Traits\Apitraits;
use App\Locater;
......@@ -122,8 +121,7 @@ class SearchController extends Controller
$api_url = config('app.api_location');
$locationDetailAPIdata = $this->call_api($api_url,$locatorID);
$homepage = Homepage::where('homepages.status', '=', '1')->first();
return view('frontend.searchs.detail', compact('homepage','locatorID','locationDetailAPIdata','pageData'));
return view('frontend.searchs.detail', compact('locatorID','locationDetailAPIdata','pageData'));
}
......@@ -133,59 +131,40 @@ class SearchController extends Controller
$api_url = config('app.api_search');
$locationDetailAPIdata = $this->call_api_page($api_url,$request['query']);
if(empty($locationDetailAPIdata['data'])){
$html = view('frontend.searchs.autocomplete', compact('locationDetailAPIdata'))->render();
return response()->json([
'status' => 'error',
'data' => $html
]);
}else{
$html = view('frontend.searchs.autocomplete', compact('locationDetailAPIdata'))->render();
return response()->json([
$html = view('frontend.searchs.autocomplete', compact('locationDetailAPIdata'))->render();
return [
'status' => 'success',
'data' => $html
]);
}
];
}
/**
* For render Review ajax
* */
public function reviewpaginate(Request $request)
public function reviewPaginate(Request $request)
{
$api_url = config('app.api');
$reviewData = $this->review_api_detail($api_url,$request->locatorID,$request->page);
$reviewData = $this->review_api_detail($api_url, $request->locatorID, $request->page);
if ( count($reviewData['data']) < 1 ) return '';
return view('frontend.searchs.review_element', compact('reviewData'));
}
public function getCityValue(Request $request)
{
$getCityData = City::where('cities.name', '!=', '')->where('cities.parent_id', '=', $request->state)->pluck('name','id')->toarray();
$getCityData = City::where('cities.name', '!=', '')
->where('cities.parent_id', '=', $request->state)
->where('cities.is_deleted', '=', '0')
->where('cities.status', '=', '1')
->pluck('name','id')->toarray();
if(!empty($getCityData)){
$html = view('frontend.searchs.city_dropdown', compact('getCityData'))->render();
return response()->json([
'status' => 'success',
'data' => $html
]);
}else{
$html = view('frontend.searchs.city_dropdown', compact('getCityData'))->render();
return response()->json(['status' => 'error', 'data' => $html]);
}
$html = view('frontend.searchs.city_dropdown', compact('getCityData'))->render();
return [
'status' => 'success',
'data' => $html
];
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment