<?php

namespace App\Http\Controllers;

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

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

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

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