예제 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $query = Resource::orderBy("name");
     $paginate = new PaginateService($query);
     $this->data->resources = $paginate->data();
     $this->data->paging = $paginate->paging();
     if (Request::ajax()) {
         return $this->json();
     }
     return $this->view();
 }