Exemplo n.º 1
0
 /**
  * @return array|\Illuminate\Database\Eloquent\Collection|static[]
  */
 public function all()
 {
     $page = Input::get('page', 1);
     $banks = $this->bank;
     $limit = Input::get('limit', 1);
     $start = Input::get('start', 0);
     $bank = $banks->orderBy('updated_at', 'DESC')->skip($start)->take($limit)->get();
     $total = $this->bank->count();
     $data = array('success' => true, 'results' => $bank->toArray(), 'total' => $total);
     return \Response::json($data)->setCallback(Input::get('callback'));
 }