Beispiel #1
0
 public function directors()
 {
     $d_id = Executive::where('position', '=', 'Directors')->first()->id;
     $d_joins = DB::table('executive_user')->where('year_id', '=', $this->id)->where('executive_id', '=', $d_id)->where('non_executive', '=', false)->get();
     $directors = array();
     foreach ($d_joins as $d) {
         $directors[] = User::find($d->user_id);
     }
     return $directors;
 }
Beispiel #2
0
 function exe_more()
 {
     $executives = new Executive();
     lang_filter($executives->where("start_date <= date(sysdate()) and (end_date >= date(sysdate()) or end_date = date('0000-00-00')) and status = 'approve'"));
     $data['executives'] = $executives->order_by('id', 'desc')->get();
     $this->template->build('exe_more', $data);
 }