Advertisement
fadlyshafa

Untitled

Feb 14th, 2020
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.94 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement