<?php

namespace App\Http\Controllers;

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

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

	// GET /erx
	public function index(Request $request) {
		$records = DB::table('action_item')->where('action_item_category', 'RX')->get();
		return response()->view('pro/erx/index', compact('records'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

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