/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { //$healthInfos = HealthReport::all(); $healthReport = Info::all(); //dd($healthReport); return view('admin.AdminHealth.adminHealthInfos', compact('healthReport')); }
public function handle($request, Closure $next) { $today = Carbon::now('Asia/Manila'); $report_date = Config::find(1); // Send a report if today is not set to our config table if ($report_date->report_date->day != $today->day || $report_date->report_date->month != $today->month || $report_date->report_date->year != $today->year) { $report_date->report_date = $today; $report_date->save(); $deadline_names = []; $i = new \App\Info(); foreach (\App\Info::all() as $info) { $deadline = $i->isDeadLineToday($info->dead_line); if ($deadline == 'deadline' && $info->claim_status != 'approved') { $deadline_names[$info->name] = $info; } } $data = array('data' => $deadline_names); \Log::info('Sending mail....'); \Mail::send('email.email', $data, function ($message) { $message->from('*****@*****.**', 'GIBX Internal System'); $date = \Carbon\Carbon::today('Asia/Manila')->format('d/m/Y'); $recipients = ['*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**']; $message->to($recipients)->subject('GIBX Claims System Daily Report ' . $date); }); // TODO: Send an email for reporting here... } return $next($request); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(Request $request) { // $lesson = Lesson::where('user_id', $request->user()->id)->get()->medias; if (Auth::user()->group_id != 1) { $lessons = Lesson::where('category_id', Auth::user()->category_id)->get(); $infos = Info::all(); $notes = Note::where('user_id', Auth::user()->id)->get(); } else { $lessons = Lesson::all(); $infos = Info::all(); $notes = Note::where('user_id', Auth::user()->id)->get(); } return view('home.index', compact('lessons', 'infos', 'notes')); }
public function index_info() { $infos = Info::all(); return view('trainers.info_index', compact('infos'))->with('trainings', 'active'); }
public function getQuickReport() { $date = \Carbon\Carbon::today('Asia/Manila'); $excelName = 'Claims System Report ' . $date->format('d/m/Y'); \Excel::create($excelName, function ($excel) { $excel->sheet('Quick Report', function ($sheet) { // Change font style $sheet->setStyle(array('font' => array('name' => 'Arial', 'size' => 10))); // Change cells background color $sheet->cells('A1:X1', function ($cells) { $cells->setFontColor('#D0CBCB'); $cells->setBackground('#404040'); $cells->setFontWeight('bold'); }); // Populate data from model $sheet->fromModel(\App\Info::all()); }); })->export('xlsx'); }
public function index() { $info = Info::all(); $info1 = Info::where('id', '1'); return view('index-2', compact('info')); }
public function trainee_by_course_id($course_id) { $trainees = Info::all(); return view('admin/admin_trainee/show_trainee_list')->with('trainees', $trainees); }