<?php

namespace App\Http\Controllers;

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

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

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

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

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