<?php

namespace App\Http\Controllers;

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

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

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

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