<?php

namespace App\Http\Controllers;

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

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

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

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