Example #1
0
 function list_search_condition()
 {
     $user_searches = User_search::where('user_id', $this->user->id)->get();
     foreach ($user_searches as &$user_search) {
         if ($user_search->shokushu_id) {
             $user_search['user_shokushus'] = unserialize($user_search->shokushu_id);
         }
         if ($user_search->kinmuchi_id) {
             $user_search['user_kinmuchis'] = unserialize($user_search->kinmuchi_id);
         }
         if ($user_search->keitai_id) {
             $user_search['user_keitais'] = unserialize($user_search->keitai_id);
         }
         if ($user_search->category_id) {
             $user_search['user_categories'] = unserialize($user_search->category_id);
         }
     }
     $shokushus = Shokushu::get();
     $kinmuchis = Kinmuchi::get();
     $keitais = Keitai::orderBy('sort_order', 'asc')->get();
     $categories = Category::orderBy('sort_order', 'asc')->get();
     //        return $user_searches;
     return view('my.list_search_condition', ['user_searches' => $user_searches, 'shokushus' => $shokushus, 'kinmuchis' => $kinmuchis, 'keitais' => $keitais, 'categories' => $categories]);
 }
Example #2
0
 function edit_mail()
 {
     $shokushus = Shokushu::orderby('sort_order', 'asc')->get();
     $user_shokushus = User_shokushu::where('user_id', $this->user['id'])->get();
     $kinmuchis = Kinmuchi::get();
     $user_kinmuchis = User_kinmuchi::where('user_id', $this->user['id'])->get();
     $keitais = Keitai::orderby('sort_order', 'asc')->get();
     $user_keitais = User_keitai::where('user_id', $this->user['id'])->get();
     //希望工作
     $user_shokushu = [];
     foreach ($user_shokushus as $v) {
         $user_shokushu[] = $v->shokushu_id;
     }
     //希望工作地点
     $user_kinmuchi = [];
     foreach ($user_kinmuchis as $v) {
         $user_kinmuchi[] = $v->kinmuchi_id;
     }
     //希望雇佣形式
     $user_keitai = [];
     foreach ($user_keitais as $v) {
         $user_keitai[] = $v->keitai_id;
     }
     return view('my.edit.mail', ['shokushus' => $shokushus, 'kinmuchis' => $kinmuchis, 'keitais' => $keitais, 'user_shokushu' => $user_shokushu, 'user_kinmuchi' => $user_kinmuchi, 'user_keitai' => $user_keitai]);
 }