@extends('layouts.app') @section('title','Dev: Switch Role') @section('content')

Dev: Quick Switch Role

@if(session('error'))
{{ session('error') }}
@endif @if(session('success'))
{{ session('success') }}
@endif

Klik role untuk langsung login sebagai akun contoh. Jika user belum ada di database, akan dibuat otomatis.

@php $staticRoles = [ ['label' => 'DPJB', 'username' => 'DPJB', 'password' => 'SimrsRSUD!'], ['label' => 'Admin', 'username' => 'AdminRSUD', 'password' => 'SimrsRSUD!'], ['label' => 'TPP', 'username' => 'TPP', 'password' => 'SimrsRSUD!'], ['label' => 'KPP', 'username' => 'KPP', 'password' => 'SimrsRSUD!'], ['label' => 'Unit Farmasi', 'username' => 'Farmasi', 'password' => 'SimrsRSUD!'], ['label' => 'Perawat Anestesi', 'username' => 'KepAnes', 'password' => 'SimrsRSUD!'], ]; @endphp @foreach($staticRoles as $r)

{{ $r['label'] }}

Username: {{ $r['username'] }}

Password: {{ $r['password'] }}

Login sebagai {{ $r['label'] }}
@endforeach

Hanya gunakan di lingkungan dev/local. Jika tampilan ini tidak diperlukan di produksi, hapus rute /dev.

@endsection