ListController.php 964 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace App\Http\Controllers\Admin;
  3. use Illuminate\Http\Request;
  4. use App\Http\Controllers\Controller;
  5. use App\Models\Destination;
  6. use App\Models\Admin;
  7. use Auth;
  8. use Session;
  9. class ListController extends Controller
  10. {
  11. public function __construct()
  12. {
  13. $this->middleware('admin');
  14. }
  15. public function destinations()
  16. {
  17. $destinations = model('Destination')::get();
  18. return view('admin.list.destinations',compact('destinations'));
  19. }
  20. public function institutes()
  21. {
  22. $institutes = model('Institute')::with('courses')->get();
  23. return view('admin.list.institutes',compact('institutes'));
  24. }
  25. public function campuses()
  26. {
  27. $campuses = model('Campus')::get();
  28. return view('admin.list.campuses',compact('campuses'));
  29. }
  30. public function levels()
  31. {
  32. $levels = model('Level')::get();
  33. return view('admin.list.levels',compact('levels'));
  34. }
  35. }