first commit of ritikesh freeu
This commit is contained in:
@@ -33,7 +33,7 @@ class HomeController extends Controller
|
||||
// dd($this->getAllTopPickProducts()['data']->toArray());
|
||||
return view('Frontend.Pages.index', [
|
||||
'topPicks' => $this->getAllTopPickProducts(),
|
||||
'testimonial' => Testimonial::where('is_active',true)->get(),
|
||||
'testimonial' => Testimonial::where('is_active', true)->get(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -43,15 +43,14 @@ class HomeController extends Controller
|
||||
session()->forget('risk_disclosure');
|
||||
$checkRiskDisclosure = $request->checked_risk_disclosure == 'true' ? Session::put('risk_disclosure', 'true') : Session::put('risk_disclosure', 'false');
|
||||
// dd(Session::get('risk_disclosure'));
|
||||
if(Session::get('risk_disclosure') == 'true')
|
||||
{
|
||||
return response()->json(['status'=>200]);
|
||||
if (Session::get('risk_disclosure') == 'true') {
|
||||
return response()->json(['status' => 200]);
|
||||
}
|
||||
}
|
||||
|
||||
public function getAllTopPickProducts()
|
||||
{
|
||||
$data['data'] = Product::getAllDetails()->where('top_pick',true)->where('products.status',1)->where('categories.status',true)->get();
|
||||
$data['data'] = Product::getAllDetails()->where('top_pick', true)->where('products.status', 1)->where('categories.status', true)->get();
|
||||
// dd($data['data']);
|
||||
// foreach($data['data'] as $row)
|
||||
// {
|
||||
@@ -234,7 +233,7 @@ class HomeController extends Controller
|
||||
{
|
||||
$user = User::find($request->user()->id);
|
||||
$count = $user->unreadNotifications->count();
|
||||
return response()->json(['status'=>200,'count'=>$count]);
|
||||
return response()->json(['status' => 200, 'count' => $count]);
|
||||
}
|
||||
|
||||
public function getAllNotificationsApi(Request $request)
|
||||
|
||||
Reference in New Issue
Block a user