Nenhuma descrição

AgreementController.php 1.5KB

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