설명 없음

AgreementController.php 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. class AgreementController extends \BaseController
  3. {
  4. /**
  5. * Display a listing of the resource.
  6. *
  7. * @return Response
  8. */
  9. public function index()
  10. {
  11. //
  12. $user = Auth::user();
  13. $title = "Agreement";
  14. return View::make('global.agreement', compact('title', 'user'));
  15. }
  16. /**
  17. * Show the form for creating a new resource.
  18. *
  19. * @return Response
  20. */
  21. public function agree()
  22. {
  23. // var_dump(Input::get('submitbutton'));exit();
  24. if (Input::get('submitbutton') == "Agree") {
  25. switch (Auth::user()->role) {
  26. case 1:
  27. return Redirect::intended('administrator');
  28. break;
  29. case 2:
  30. return Redirect::intended('school/' . Auth::user()->school->id);
  31. break;
  32. case 3:
  33. return Redirect::intended('program-coordinator');
  34. break;
  35. case 4:
  36. return Redirect::intended('professor');
  37. break;
  38. }
  39. } else {
  40. return Redirect::intended('logout');
  41. }
  42. //
  43. }
  44. /**
  45. * Store a newly created resource in storage.
  46. *
  47. * @return Response
  48. */
  49. public function store()
  50. {
  51. //
  52. }
  53. /**
  54. * Display the specified resource.
  55. *
  56. * @param int $id
  57. * @return Response
  58. */
  59. public function show($id)
  60. {
  61. //
  62. }
  63. /**
  64. * Show the form for editing the specified resource.
  65. *
  66. * @param int $id
  67. * @return Response
  68. */
  69. public function edit($id)
  70. {
  71. //
  72. }
  73. /**
  74. * Update the specified resource in storage.
  75. *
  76. * @param int $id
  77. * @return Response
  78. */
  79. public function update($id)
  80. {
  81. //
  82. }
  83. /**
  84. * Remove the specified resource from storage.
  85. *
  86. * @param int $id
  87. * @return Response
  88. */
  89. public function destroy($id)
  90. {
  91. //
  92. }
  93. }