<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Destination;
use App\Models\Admin;
use Auth;
use Session;

class ListController extends Controller
{
    public function __construct()
    {
        $this->middleware('admin');
    }
    
    public function destinations()
    {
        $destinations = model('Destination')::get();
        return view('admin.list.destinations',compact('destinations'));
    }

    public function institutes()
    {
        $institutes = model('Institute')::with('courses')->get();
        return view('admin.list.institutes',compact('institutes'));
    }

    public function campuses()
    {
        $campuses = model('Campus')::get();
        return view('admin.list.campuses',compact('campuses'));
    }

    public function levels()
    {
        $levels = model('Level')::get();
        return view('admin.list.levels',compact('levels'));
    }
}
