<?php

namespace App\Http\Controllers;

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

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

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

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