HomeController.php 1022 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. }