Exemplo n.º 1
0
 public function search(Request $request)
 {
     return Response::json(['status' => "OK", "message" => "A list of all companies and current recruiter count. To be used for lightweight operations such as search.", "response" => Company::leftJoin('users', 'company.id', '=', 'users.company_id')->select('company.id', 'company.company_name', DB::raw('count(users.id) as recruiter_count'))->orderBy('company_name')->groupBy('company_name')->get()], 200);
 }