SHARE
TWEET

Untitled

fadlyshafa Feb 14th, 2020 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. namespace App\Http\Controllers\Dashboard;
  4.  
  5. use Illuminate\Http\Request;
  6. use App\Http\Controllers\Controller;
  7.  
  8. use App\User;
  9.  
  10. class Peserta_controller extends Controller
  11. {
  12.     public function index(){
  13.         $title = 'Data peserta';
  14.         $data = User::withCount('biodata_r')->orderBy('name','asc')->get();
  15.  
  16.         return view('dashboard.peserta.index',compact('title','data'));
  17.     }
  18.  
  19.     public function diverifikasi(){
  20.         $title = 'Data peserta yang sudah di verifikasi';
  21.         $data = User::withCount('biodata_r')->where('is_verifikasi',1)->orderBy('name','asc')->get();
  22.  
  23.         return view('dashboard.peserta.index',compact('title','data'));
  24.     }
  25.  
  26.     public function belum_verifikasi(){
  27.         $title = 'Data peserta yang belum di verifikasi';
  28.         $data = User::withCount('biodata_r')->whereNull('is_verifikasi')->orderBy('name','asc')->get();
  29.  
  30.         return view('dashboard.peserta.index',compact('title','data'));
  31.     }
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top