Advertisement
Guest User

Untitled

a guest
Nov 4th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.34 KB | None | 0 0
  1. public function index()
  2.     {
  3.         if (auth()->check()) {
  4.             if (is_null(auth()->user()->trader_id)) {
  5.                 if (auth()->user()->status_id == "ROL99") { //Administrator
  6.                     return view('admin.home');
  7.                 }elseif(auth()->user()->status_id == "ROL10") { //Penerima Berkas - Admin
  8.                     if (auth()->user()->commodity_id == "COMOT") {
  9.                         return view('penerima_berkas.home');
  10.                     }
  11.                 }elseif(auth()->user()->status_id == "ROL20") { //Evaluator
  12.                     return view('evaluator.home');
  13.                 }elseif (auth()->user()->status_id == "ROL30") { // Kasie
  14.                     return view('kasie.home');
  15.                 }elseif(auth()->user()->status_id == "ROL40") { // Kasubdit
  16.                     return view('kasubdit.home');
  17.                 }elseif(auth()->user()->status_id == "ROL50") { // Direktur
  18.                     return view('direktur.home');
  19.                 }
  20.             } else {
  21.                 if (auth()->user()->status_id == 'STS00') { //Pelaku Usaha Belum Aktif
  22.                     return view('belumaktif');
  23.                 } elseif(auth()->user()->status_id == 'STS10') { //Pelaku Usaha Sudah Aktif
  24.                     return view('pelaku.home');
  25.                 }
  26.             }
  27.         }
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement