<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;

class care_month_entries_Controller extends Controller
{
    public $selfName = 'care_month_entries_Controller';
    public $dashboardName = 'dashboard';

	// GET /care_month_entries
	public function index(Request $request) {
		$records = DB::table('care_month_entry')->get();
		$result_pros = DB::select("SELECT id, name_display FROM pro");
		return response()->view('pro/care_month_entries/index', compact('records', 'result_pros'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /care_month_entries/view/{uid}
	public function view(Request $request, $uid) {
		return redirect("/care_month_entries/view/$uid/SUB_dashboard");
	}
}
