<?php /* DO NOT GENERATE */ ?>
<?php

namespace App\Http\Controllers;

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

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

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

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

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