HomeController.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace App\Http\Controllers;
  3. use Illuminate\Http\Request;
  4. use App\User;
  5. use Auth;
  6. class HomeController extends Controller
  7. {
  8. /**
  9. * Create a new controller instance.
  10. *
  11. * @return void
  12. */
  13. public function __construct()
  14. {
  15. // $this->middleware('auth');
  16. }
  17. public function student_q_form($hash)
  18. {
  19. $hashids=new \Hashids\Hashids('student_q_signup', 25);
  20. $hash_teacher_ids=$hashids->decode($hash);
  21. $user =User::find($hash_teacher_ids[0]);
  22. if(empty($hash_teacher_ids[0])) abort(404);
  23. return view('q_apply_form',compact('hash_teacher_ids','user'));
  24. }
  25. public function wishlist_student_register($hash)
  26. {
  27. $hashids=new \Hashids\Hashids('student_wishlist_signup', 25);
  28. $hash_student_ids=$hashids->decode($hash);
  29. if(empty($hash_student_ids[0])) abort(404);
  30. $user =User::find($hash_student_ids[0]);
  31. return view('auth.wishlist_register_form',compact('hash_student_ids','user'));
  32. }
  33. public function wishlist_teacher_register($hash)
  34. {
  35. $hashids=new \Hashids\Hashids('teacher_wishlist_signup', 25);
  36. $hash_ids=$hashids->decode($hash);
  37. if(empty($hash_ids[0])) abort(404);
  38. $user =User::find($hash_ids[0]);
  39. $departments =Department::where('status',1)->orderBy('name','ASC')->get();
  40. $universities =University::orderBy('name','ASC')->get();
  41. return view('auth.invited_register_form',compact('hash_ids','user','departments','universities'));
  42. }
  43. }