Beispiel #1
0
 public function getGet(Request $request, $page = 1)
 {
     $res = ['response' => 'YES', 'status' => 0];
     $businesses = Business::apiGet($page, 10);
     if (is_array($businesses)) {
         $res['status'] = 1;
         if (count($businesses) > 0) {
             $res['html'] = view('auth.business.templet.businesses', ['businesses' => $businesses])->render();
         } else {
             $res['html'] = '';
         }
     } else {
         $res['msgError'] = '加载失败,请稍后再试';
     }
     return response()->json($res);
 }