コード例 #1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     //$id=job_id;
     $jobs = Job::with('creator')->get();
     $review = Review::with('job')->findorFail($id);
     $data = array('jobs' => $jobs, 'review' => $review);
     return View::make('temp_reviews.show')->with($data);
 }
コード例 #2
0
 public function show(User $user, Application $app)
 {
     if (\Auth::check()) {
         $url = str_contains($this->checkloginpage($user->name), \Auth::user()->name);
     } else {
         $url = false;
     }
     $review = Review::with('users')->where('application_id', '=', $app->id)->get();
     return view('userApp.showUserApp', compact('app', 'review', 'user', 'url'));
 }
コード例 #3
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $user = User::findOrFail($id);
     $jobIds = array();
     foreach ($user->appliedJobs as $job) {
         $jobIds[] = $job->id;
     }
     if (count($jobIds) > 0) {
         $reviews = Review::with('job')->whereIn('job_id', $jobIds)->orderBy('created_at', 'desc')->paginate(4);
     } else {
         $reviews = [];
     }
     $data = array('user' => $user, 'reviews' => $reviews);
     return View::make('users.view_profile')->with($data);
 }