Advertisement
fadlyshafa

Untitled

Feb 8th, 2020
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 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\Models\Biodata;
  9.  
  10. class Beranda_controller extends Controller
  11. {
  12.     public function index(){
  13.         $title = 'Halaman Dashboard';
  14.  
  15.         $user_id = \Auth::user()->id;
  16.  
  17.         $cek = Biodata::where('users',$user_id)->count();
  18.         if($cek < 1){
  19.             $pesan = 'Harap Melengkapi Biodata Terlebih Dahulu';
  20.         }else{
  21.             $pesan = 'Biodata Anda Sudah Dilengkapi.. Terima Kasih';
  22.         }
  23.  
  24.         return view('dashboard.beranda.index',compact('title','pesan'));
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement