/**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show()
 {
     $user = Auth::user();
     $email = $user->email;
     $array['index'] = Skills::where('email', $email)->get();
     return view('skills', $array);
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $title = 'profile';
     $user = Corpuser::where('id', '=', Auth::user()->corpuser_id)->first();
     $skills = Skills::lists('name', 'name');
     return view('pages.firm_details', compact('user', 'title', 'skills'));
 }
 public function delete(Request $request)
 {
     if (!ACL::hasPermission('skills', 'delete')) {
         return redirect(route('skills'))->withErrors(['You don\'t have permission for delete the skills.']);
     }
     Skills::find($request->get('skillsId'))->delete();
     $success = "Skill deleted successfully.";
     return redirect(route('skills'))->with(compact('success'));
 }
 public function index()
 {
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $aboutMe = AboutMe::orderBy('sortorder', 'asc')->get();
     $experiences = Experience::orderBy('dateStart', 'desc')->get();
     $skills = Skills::orderBy('sortorder', 'asc')->get();
     $languages = Language::orderBy('sortorder', 'asc')->get();
     //foreach($languages as $language):
     //dd($language->writeName);
     //endforeach;
     return view('website.aboutme')->with(compact('websiteSettings', 'aboutMe', 'experiences', 'skills', 'languages'));
 }
Beispiel #5
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $title = 'skill';
     $skills = Skills::lists('name', 'name');
     $farearoleList = Functional_area_role_mapping::orderBy('id')->get();
     $education = Education::orderBy('level')->orderBy('name')->get();
     $postskill = Postjob::where('unique_id', '=', $id)->where('individual_id', '=', Auth::user()->induser_id)->first();
     return view('pages.postskill_edit', compact('title', 'skills', 'farearoleList', 'education', 'postskill'));
 }
Beispiel #6
0
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    // prelevo l'elenco delle squadre
    $teams = \App\Team::all();
    return view('home', ['teams' => $teams]);
});
Route::get('team/{slug}', function ($slug) {
    // prelevo l'oggetto TEAM con la lista dei giocatori associati
    $team = \App\Team::where('slug', '=', $slug)->firstOrFail();
    return view('players', ['players' => $team->players]);
});
Route::get('player/{id}', function ($player_id) {
    // prelevo tutte le informazioni del PLAYER con id=$player_id
    $player = \App\Skills::where('player_id', $player_id)->firstOrFail();
    return view('player_info', ['data' => $player]);
});
Route::get('fantateam', function () {
    // prelevo l'elenco delle fanta-squadre
    $teams = \App\Fantateam::all();
    return view('fantateams', ['teams' => $teams]);
});
Route::get('fantateam/{slug}', function ($slug) {
    $fantateam = \App\Fantateam::where('slug', '=', $slug)->firstOrFail();
    return view('players', ['players' => $fantateam->players]);
});
Route::get('gestione/fantateams', function () {
    return view('gestione_fantateams');
});
Beispiel #7
0
 public function addNewSkills(Request $request)
 {
     if ($request->ajax()) {
         $skill = Skills::create(['name' => $request['name']]);
         return $skill->id;
     }
 }
Beispiel #8
0
 public function about()
 {
     $skills = Skills::all();
     $experiences = Experiences::all();
     return view('page.about')->with('skills', $skills)->with('experiences', $experiences);
 }
Beispiel #9
0
 public function createUserRequest(Request $request)
 {
     $skills = Skills::lists('name', 'name');
     $educationList = Education::orderBy('level')->orderBy('name')->where('name', '!=', '0')->get();
     $farearoleList = Functional_area_role_mapping::orderBy('id')->get();
     $indUser = new Induser();
     $indUser->fname = $request['fname'];
     $indUser->lname = $request['lname'];
     $indUser->gender = $request['gender'];
     $indUser->city = $request['city'];
     $indUser->about_individual = $request['about_individual'];
     $indUser->education = $request['education'];
     $indUser->experience = $request['experience'];
     $indUser->working_status = $request['working_status'];
     $indUser->working_at = $request['working_at'];
     $indUser->industry = $request['industry'];
     if ($request['role'] != null) {
         $farea_role = $request['role'];
         $temp = explode('-', $farea_role);
         $indUser->functional_area = $temp[0];
         $indUser->role = $temp[1];
     }
     if ($request['linked_skill_id'] != null) {
         $indUser->linked_skill = implode(', ', $request['linked_skill_id']);
     }
     if ($request['prefered_location'] != null) {
         $indUser->prefered_location = implode(', ', $request['prefered_location']);
     }
     $indUser->email = $request['email'];
     $indUser->mobile = $request['mobile'];
     $indUser->prefered_jobtype = $request['prefered_jobtype'];
     $indUser->save();
     $user = new User();
     $user->name = $request['fname'] . ' ' . $request['lname'];
     $user->email = $request['email'];
     $user->mobile = $request['mobile'];
     $user->password = md5(rand(111111, 999999));
     $user->identifier = 1;
     if ($request['email'] != null) {
         $vcode = 'A' . rand(1111, 9999);
         $user->email_vcode = $vcode;
     }
     if ($request['mobile'] != null) {
         $otp = rand(1111, 9999);
         $user->mobile_otp = $otp;
     }
     $resetCode = md5(rand(11111, 99999));
     $user->reset_code = $resetCode;
     $indUser->user()->save($user);
     $email = $request['email'];
     if ($request['email'] != null) {
         $email = $request['email'];
         $fname = $request['fname'];
         Mail::send('emails.auth.resetpassword', array('fname' => $fname, 'token' => $resetCode), function ($message) use($email, $fname) {
             $message->to($email, $fname)->subject('Jobtip - Profile Created!')->from('*****@*****.**', 'JobTip');
         });
     }
     return view('pages.create_users', compact('skills', 'educationList', 'farearoleList'))->withErrors(['errors' => 'Profile Created Successfully.']);
 }
 public function edit_view()
 {
     if (Auth::user()->identifier == 1) {
         $title = 'indprofile_edit';
         $user = User::where('id', '=', Auth::user()->id)->with('induser')->first();
         $skills = Skills::lists('name', 'name');
         $thanks = Postactivity::with('user', 'post')->join('postjobs', 'postjobs.id', '=', 'postactivities.post_id')->where('postjobs.individual_id', '=', Auth::user()->induser_id)->where('postjobs.inactive', '=', 0)->where('postactivities.thanks', '=', 1)->orderBy('postactivities.id', 'desc')->sum('postactivities.thanks');
         $posts = Postjob::where('individual_id', '=', Auth::user()->induser_id)->count('id');
         $linksCount = Connections::where('user_id', '=', Auth::user()->induser_id)->where('status', '=', 1)->orWhere('connection_user_id', '=', Auth::user()->induser_id)->where('status', '=', 1)->count('id');
         $educationList = Education::orderBy('level')->orderBy('name')->where('name', '!=', '0')->get();
         $location = Induser::where('id', '=', Auth::user()->induser_id)->first(['prefered_location']);
         // $loc = explode(',', $location);
         $farearoleList = Functional_area_role_mapping::orderBy('id')->get();
         $acc_id = "";
         $profilePer = 0;
         if (Auth::user()->induser->fname != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->lname != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->email != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->mobile != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->dob != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->city != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->fb_page != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->in_page != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->gender != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->about_individual != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->education != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->experience != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->working_status != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->working_at != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->role != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->linked_skill != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->resume != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->prefered_location != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->prefered_jobtype != null) {
             $profilePer = $profilePer + 1;
         }
         if (Auth::user()->induser->profile_pic != null) {
             $profilePer = $profilePer + 1;
         }
         $profilePer = round($profilePer / 20 * 100);
         return view('pages.professional_page', compact('user', 'acc_id', 'title', 'skills', 'educationList', 'location', 'farearoleList', 'thanks', 'linksCount', 'posts', 'profilePer'));
     } else {
         if (Auth::user()->identifier == 2) {
             $title = 'corpprofile_edit';
             $user = User::where('id', '=', Auth::user()->id)->with('corpuser')->first();
             $skills = Skills::lists('name', 'name');
             $acc_id = "";
             return view('pages.firm_details', compact('user', 'title', 'skills', 'acc_id'));
         }
     }
 }
Beispiel #11
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Skills::where('id', $id)->delete();
     return back()->withSuccess('Skill deleted successfully!');
 }
Beispiel #12
0
    public function postFilter(Request $request)
    {
        $title = 'home';
        $sort_by = " ";
        $sort_by_skill = " ";
        $skillfilter = "";
        $skills = Skills::lists('name', 'name');
        $filter = Filter::where('from_user', '=', Auth::user()->id)->where('post_type', '=', 'job')->first();
        $links = DB::select('select id from indusers
								where indusers.id in (
										select connections.user_id as id from connections
										where connections.connection_user_id=?
										 and connections.status=1
										union 
										select connections.connection_user_id as id from connections
										where connections.user_id=?
										 and connections.status=1
							)', [Auth::user()->induser_id, Auth::user()->induser_id]);
        $links = collect($links);
        $linksApproval = DB::select('select id from indusers
									where indusers.id in (
											select connections.user_id as id from connections
											where connections.connection_user_id=?
											 and connections.status=0
									)', [Auth::user()->induser_id]);
        $linksApproval = collect($linksApproval);
        $linksPending = DB::select('select id from indusers
									where indusers.id in (
											select connections.connection_user_id as id from connections
											where connections.user_id=?
											 and connections.status=0
									)', [Auth::user()->induser_id]);
        $linksPending = collect($linksPending);
        $groups = Group::leftjoin('groups_users', 'groups_users.group_id', '=', 'groups.id')->where('groups.admin_id', '=', Auth::user()->induser_id)->orWhere('groups_users.user_id', '=', Auth::user()->induser_id)->groupBy('groups.id')->get(['groups.id as id'])->lists('id');
        if (Auth::user()->induser_id != null) {
            $following = DB::select('select id from corpusers 
									 where corpusers.id in (
										select follows.corporate_id as id from follows
										where follows.individual_id=?
								)', [Auth::user()->induser_id]);
            $following = collect($following);
        }
        if (Auth::user()->corpuser_id != null) {
            $following = DB::select('select id from indusers
									 where indusers.id in (
										select follows.individual_id as id from follows
										where follows.corporate_id=?
								)', [Auth::user()->corpuser_id]);
            $following = collect($following);
        }
        if (Auth::user()->identifier == 1) {
            $share_links = Induser::whereRaw('indusers.id in (
											select connections.user_id as id from connections
											where connections.connection_user_id=?
											 and connections.status=1
											union 
											select connections.connection_user_id as id from connections
											where connections.user_id=?
											 and connections.status=1
								)', [Auth::user()->induser_id, Auth::user()->induser_id])->get(['id', 'fname'])->lists('fname', 'id');
            $share_groups = Group::leftjoin('groups_users', 'groups_users.group_id', '=', 'groups.id')->where('groups.admin_id', '=', Auth::user()->induser_id)->orWhere('groups_users.user_id', '=', Auth::user()->induser_id)->groupBy('groups.id')->get(['groups.id as id', 'groups.group_name as name'])->lists('name', 'id');
        }
        $skillPosts = Postjob::orderBy('id', 'desc')->with('indUser', 'corpUser', 'postActivity', 'taggedUser', 'taggedGroup')->where('post_type', '=', 'skill')->where('individual_id', '!=', Auth::user()->induser_id)->where('postjobs.inactive', '=', 0)->paginate(15);
        // $post_type = $request['post_type'];
        $post_title = $request['jobTitle'];
        $experience = $request['experience'];
        $time_for = $request['time_for'];
        $skill = $request['jobSkill'] != null ? implode(',', $request['jobSkill']) : null;
        $industry = $request['industry'];
        // return $skill;
        $jobPosts = Postjob::orderBy('postjobs.id', 'desc')->with('indUser', 'corpUser', 'postActivity', 'preferLocations')->leftjoin('post_preferred_locations', 'post_preferred_locations.post_id', '=', 'postjobs.id')->where('individual_id', '!=', Auth::user()->induser_id)->where('inactive', '=', 0);
        if ($time_for != null) {
            $jobPosts->whereIn('time_for', $time_for);
        }
        /*if($post_type == 'job'){
        			$jobPosts->where('post_type', '=', $post_type);
        		}*/
        if ($skill != null) {
            $jobPosts->where('linked_skill', 'like', '%' . $skill . '%');
        }
        if ($post_title != null) {
            $jobPosts->where('post_title', 'like', '%' . $post_title . '%')->whereRaw("(job_detail like '%" . $post_title . "%' or role like '%" . $post_title . "%' or linked_skill like '%" . $post_title . "%')");
        }
        if ($industry != null) {
            $jobPosts->where('industry', 'like', '%' . $industry . '%');
        }
        if ($experience != null) {
            $jobPosts->whereRaw("{$experience} between min_exp and max_exp");
        }
        $jobPosts = $jobPosts->groupBy('unique_id')->paginate(15);
        // return $jobPosts;
        return view('pages.homeFiltered', compact('jobPosts', 'skillPosts', 'linksApproval', 'linksPending', 'title', 'links', 'groups', 'following', 'userSkills', 'skills', 'share_links', 'share_groups', 'sort_by', 'sort_by_skill', 'filter', 'skillfilter', 'submitFilter'));
    }
Beispiel #13
0
 public function accountDelete()
 {
     if (Auth::user()->identifier == 1) {
         $title = "AccountSetting";
         $acc_id = Input::get('account_id');
         $password = bcrypt(Input::get('password'));
         $skills = Skills::lists('name', 'name');
         $thanks = Postactivity::with('user', 'post')->join('postjobs', 'postjobs.id', '=', 'postactivities.post_id')->where('postjobs.individual_id', '=', Auth::user()->induser_id)->where('postjobs.inactive', '=', 0)->where('postactivities.thanks', '=', 1)->orderBy('postactivities.id', 'desc')->sum('postactivities.thanks');
         $posts = Postjob::where('individual_id', '=', Auth::user()->induser_id)->count('id');
         $linksCount = Connections::where('user_id', '=', Auth::user()->induser_id)->where('status', '=', 1)->orWhere('connection_user_id', '=', Auth::user()->induser_id)->where('status', '=', 1)->count('id');
         $educationList = Education::orderBy('level')->orderBy('name')->where('name', '!=', '0')->get();
         $location = Induser::where('id', '=', Auth::user()->induser_id)->first(['prefered_location']);
         $farearoleList = Functional_area_role_mapping::orderBy('id')->get();
         $userDetail = User::where('induser_id', '=', Auth::user()->induser_id)->first();
         $token = 'AD' . rand(11111, 99999) . rand(11111, 99999);
         if (Hash::check(Input::get('password'), $userDetail->password)) {
             $user = User::with('induser')->where('id', '=', Auth::user()->id)->first();
             return view('pages.professional_page', compact('title', 'user', 'acc_id', 'skills', 'educationList', 'location', 'farearoleList', 'thanks', 'linksCount', 'posts'));
         } else {
             return redirect('/mypost');
         }
     } elseif (Auth::user()->identifier == 2) {
         $title = "AccountSetting";
         $acc_id = Input::get('account_id');
         $password = bcrypt(Input::get('password'));
         $skills = Skills::lists('name', 'name');
         $userDetail = User::where('corpuser_id', '=', Auth::user()->corpuser_id)->first();
         $token = 'AD' . rand(11111, 99999) . rand(11111, 99999);
         if (Hash::check(Input::get('password'), $userDetail->password)) {
             $user = User::with('corpuser')->where('id', '=', Auth::user()->id)->first();
             return view('pages.firm_details', compact('title', 'user', 'acc_id', 'skills'));
         } else {
             return redirect('/mypost');
         }
     }
 }