Beispiel #1
0
 public function getCompany(Request $request)
 {
     $args = $request->all();
     $response = [];
     if ($request->has('id')) {
         $properties = ['CompanyStrId', 'CompanyName', 'CompanyIndustry', 'CompanyImg', 'CompanyBkgrImg', 'CompanyDescription', 'CompanyRss', 'CompanyFacebook', 'CompanyTwitter', 'CompanyDemographics', 'CompanyIsPromoted'];
         $org_info = \App\Company::getInfo($request->input('id'), $properties);
         if (!empty($org_info['CompanyName'])) {
             $response['company'] = $org_info;
             $list = \App\Company::getCompanyJobs($args);
             $response['total'] = $list['total'];
             $response['jobs'] = $list['jobs'];
             $response['current_time'] = date('Y-m-d H:i:s', time());
         }
     }
     return response()->json($response)->header('Access-Control-Allow-Origin', '*')->header('Access-Control-Allow-Methods', 'GET, POST')->setCallback($request->input('callback'));
 }