Guest User

controller

a guest
Jan 29th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. $data['body_class'] = 'election detail';
  2. $data['election'] = (
  3. Election::where('slug', $electionSlug)
  4. ->where('uuid', $request->uuid)
  5. ->where('status', 1)
  6. ->firstOrFail()
  7. );
  8. $hostels = DB::table('battle_room')->where('elections_id', $request->uuid)->get();
  9. $blocks = array();
  10. foreach($hostels as $hostel) {
  11. $blocks[] = DB::table('pasangan_calon')->where('id', $hostel->pasangan_calon_id)->get();
  12. }
  13.  
  14. return view('pages/pemilihan/mulai-page',['blocks' => $blocks], $data);
Advertisement
Add Comment
Please, Sign In to add comment