app/Http/Controllers/Front/MainHomeController.php
/// For second page data's
For second page data's
For second page data ' s
public function show_overheads_fx2(Request $request)
    {
        $findQuery = PickOverheadShadesModel::where(['master_width' => $_GET['master_width'], 'master_height' => $_GET['master_height'], 'master_post' => $_GET['master_post']])->get();
        $html['overhead_types'] = "<option value=''>Choose a overhead shades</option>";
        if(count($findQuery) > 0)
        {
            foreach($findQuery as $fQuery)
            {
                $checked = "";
                if($request->session()->has('main_unique_session_key'))
                {
                    $mQuery_check = BeforeCheckoutFinalProductModel::where('unique_session_id',$request->session()->get('main_unique_session_key'))->get();
                    foreach($mQuery_check as $mQc)
                    {
                        if($mQc->final_overhead == $fQuery->id)
                        {
                            $checked = "selected";
                        }
                    }
                }
                $html['overhead_types'] .= "<option value=".$fQuery->master_overhead_shades." ".$checked.">".$fQuery->img_standard_name."</option>";
            }
        }
        echo json_encode($html);
    }
public function show_overheads_fx2 ( Request $ request ) { $ findQuery = PickOverheadShadesModel :: where ( [ 'master_width' => $ _GET [ 'master_width' ] , 'master_height' => $ _GET [ 'master_height' ] , 'master_post' => $ _GET [ 'master_post' ] ] ) -> get ( ) ; $ html [ 'overhead_types' ] = " <option value=''>Choose a overhead shades</option> " ; if ( count ( $ findQuery ) > 0 ) { foreach ( $ findQuery as $ fQuery ) { $ checked = " " ; if ( $ request -> session ( ) -> has ( 'main_unique_session_key' ) ) { $ mQuery_check = BeforeCheckoutFinalProductModel :: where ( 'unique_session_id' , $ request -> session ( ) -> get ( 'main_unique_session_key' ) ) -> get ( ) ; foreach ( $ mQuery_check as $ mQc ) { if ( $ mQc -> final_overhead == $ fQuery -> id ) { $ checked = " selected " ; } } } $ html [ 'overhead_types' ] .= " <option value= " . $ fQuery -> master_overhead_shades . " " . $ checked . " > " . $ fQuery -> img_standard_name . " </option> " ; } } echo json_encode ( $ html ) ; }
For second page data's
For second page data ' s