Example #1
0
 public function form(RegistrationPeriod $PeriodModel, Country $CountryModel, Specialty $Specialty, Registration $Registration, RegistrationType $type)
 {
     $registration = $Registration->with('degrees', 'contactcountry', 'contactcity', 'birthcountry', 'nationalitycity')->find(daress_registerd()->id);
     $specialties = $Specialty->lists('name', 'id');
     $registration_types = $type->lists('title', 'id')->toArray();
     $countries = $CountryModel->all();
     $countries_list = ["" => ""] + $countries->lists('name', 'id')->toArray();
     $codes_list = ["" => ""] + $countries->lists('calling_code', 'id')->toArray();
     $stay_types = config('registration.stay_types');
     $social_status = ["" => ""] + config('registration.social_status');
     $social_job_status = ["" => "", 'unemployed' => 'بدون عمل', 'employed' => 'أعمل', 'retired' => 'متقاعد'];
     $years_list = ["" => ""] + array_combine(range(date("Y") - 80, date('Y')), range(date("Y") - 80, date('Y')));
     $computer_skills = ["" => "", 'excellent' => 'ممتاز', 'great' => 'جيد جدا', 'very_low' => 'ضعيف جدا', 'low' => 'ضعيف', 'good' => 'جيد'];
     $social_job_types = ["" => "", 'government' => 'عام', 'private' => 'خاص', 'free' => 'حر'];
     $social_jobs = ["" => "", 'unemployed' => 'بدون عمل', 'employed' => 'أعمل', 'retired' => 'متقاعد'];
     $references = ["" => "", 'iiswebsite' => 'موقع كلية العلوم الشرعية', 'iisewebsite' => 'موقع مركز التعليم عن بعد', 'iisfriend' => 'صديق يدرس بالكلية', 'iisefriend' => 'صديق يدرس بمركز التعليم عن بعد', 'other' => 'أخرى'];
     return view('registration::registrar.form', compact('registration', 'specialties', 'registration_types', 'period', 'years_list', 'countries', 'stay_types', 'countries_list', 'references', 'computer_skills', 'codes_list', 'social_job_types', 'social_status', 'social_jobs'));
 }
Example #2
0
 public function apply(RegistrationPeriod $PeriodModel, Country $CountryModel, Specialty $Specialty, RegistrationType $type)
 {
     $period = $PeriodModel->orderBy('id', 'desc')->with('year')->current()->first();
     if (!$period) {
         return redirect()->route('welcome');
     }
     $specialties = $Specialty->lists('name', 'id');
     $registration_types = $type->lists('title', 'id')->toArray();
     $countries = $CountryModel->all();
     $countries_list = ["" => ""] + $countries->lists('name', 'id')->toArray();
     $codes_list = ["" => ""] + $countries->lists('calling_code', 'id')->toArray();
     $stay_types = config('registration.stay_types');
     $social_status = ["" => ""] + config('registration.social_status');
     $social_job_status = ["" => "", 'unemployed' => 'بدون عمل', 'employed' => 'أعمل', 'retired' => 'متقاعد'];
     $years_list = ["" => ""] + array_combine(range(date("Y") - 80, date('Y')), range(date("Y") - 80, date('Y')));
     $computer_skills = ["" => "", 'excellent' => 'ممتاز', 'great' => 'جيد جدا', 'very_low' => 'ضعيف جدا', 'low' => 'ضعيف', 'good' => 'جيد'];
     $social_job_types = ["" => "", 'government' => 'عام', 'private' => 'خاص', 'free' => 'حر'];
     $social_jobs = ["" => "", 'unemployed' => 'بدون عمل', 'employed' => 'أعمل', 'retired' => 'متقاعد'];
     $references = ["" => "", 'iiswebsite' => 'موقع كلية العلوم الشرعية', 'iisewebsite' => 'موقع مركز التعليم عن بعد', 'iisfriend' => 'صديق يدرس بالكلية', 'iisefriend' => 'صديق يدرس بمركز التعليم عن بعد', 'other' => 'أخرى'];
     $period = $PeriodModel->orderBy('id', 'desc')->with('year')->where(function ($sql) {
         $sql->where('start_at', '<=', date('Y-m-d'))->where('finish_at', '>=', date('Y-m-d'));
     })->first();
     return view('registration::registrar.apply', compact('years_list', 'specialties', 'registration_types', 'period', 'countries', 'stay_types', 'countries_list', 'references', 'computer_skills', 'codes_list', 'social_job_types', 'social_status', 'social_jobs'));
 }