Advertisement
soden

Untitled

Nov 26th, 2022
977
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Http\Controllers;
  4.  
  5. use Illuminate\Http\Request;
  6.  
  7. class RedirectController extends Controller
  8. {
  9.     public function cek() {
  10.         if (auth()->user()->role_id === 1) {
  11.             return redirect('/superadmin');
  12.         } else {
  13.             return redirect('/pegawai');
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement