/**
  * Display all EmployeeDocuments
  *
  * @param search, skip, take
  * @return JSend Response
  */
 public function index($org_id = null, $employ_id = null)
 {
     $employee = \App\Models\Employee::organisationid($org_id)->id($employ_id)->first();
     if (!$employee) {
         return new JSend('error', (array) Input::all(), 'Karyawan tidak valid.');
     }
     $result = \App\Models\EmploymentDocument::personid($employ_id);
     if (Input::has('search')) {
         $search = Input::get('search');
         foreach ($search as $key => $value) {
             switch (strtolower($key)) {
                 default:
                     # code...
                     break;
             }
         }
     }
     $count = $result->count();
     if (Input::has('skip')) {
         $skip = Input::get('skip');
         $result = $result->skip($skip);
     }
     if (Input::has('take')) {
         $take = Input::get('take');
         $result = $result->take($take);
     }
     $result = $result->with(['document', 'documentdetails', 'documentdetails.template'])->get()->toArray();
     return new JSend('success', (array) ['count' => $count, 'data' => $result]);
 }