123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace App\Http\Controllers;
- use Illuminate\Http\Request;
- use App\User;
- use App\Models\Department;
- use App\Models\University;
- use Auth;
- class HomeController extends Controller
- {
- /**
- * Create a new controller instance.
- *
- * @return void
- */
- public function __construct()
- {
- // $this->middleware('auth');
- }
- public function student_q_form($hash)
- {
- $hashids=new \Hashids\Hashids('student_q_signup', 25);
- $hash_teacher_ids=$hashids->decode($hash);
- $user =User::find($hash_teacher_ids[0]);
- if(empty($hash_teacher_ids[0])) abort(404);
- return view('Q_apply_form',compact('hash_teacher_ids','user'));
- }
- public function q_apply_register_form($hash)
- {
- $hashids=new \Hashids\Hashids('student_wishlist_signup', 25);
- $hash_student_ids=$hashids->decode($hash);
- if(empty($hash_student_ids[0])) abort(404);
- $user =User::find($hash_student_ids[0]);
- return view('auth.q_apply_register_form',compact('hash_student_ids','user'));
- }
- public function invited_register_form($hash)
- {
- $hashids=new \Hashids\Hashids('teacher_invitation_signup', 25);
- $hash_ids=$hashids->decode($hash);
- if(empty($hash_ids[0])) abort(404);
- $user =User::find($hash_ids[0]);
- $departments =Department::where('status',1)->orderBy('name','ASC')->get();
- $universities =University::orderBy('name','ASC')->get();
- return view('auth.invited_register_form',compact('hash_ids','user','departments','universities'));
- }
- public function landing(){
- return view('supervisor.landing');
- }
- }
|