app/Http/Controllers/IndexController.php
/**
   * method for ajax Load more functionality only for parent pages
   */
method for ajax Load more functionality only for parent pages
method for ajax Load more functionality only for parent pages
public function ajax_more_parent(Request $request)
  {
    $material = ParentPage::find($request->relatedId);
    $relatedNews = $material->getRelatedNews();
    $left = $request->relatedLeft - 2;
    $html = $this->buildMoreHtml($request, $relatedNews);
    $response = array(
      'status' => 'success',
      'html' => $html,
      'left' => $left
    );
    return \Response::json($response);
  }
public function ajax_more_parent ( Request $ request ) { $ material = ParentPage :: find ( $ request -> relatedId ) ; $ relatedNews = $ material -> getRelatedNews ( ) ; $ left = $ request -> relatedLeft - 2 ; $ html = $ this -> buildMoreHtml ( $ request , $ relatedNews ) ; $ response = array ( 'status' => 'success' , 'html' => $ html , 'left' => $ left ) ; return \ Response :: json ( $ response ) ; }
method for ajax Load more functionality only for parent pages
method for ajax Load more functionality only for parent pages