Some checks failed
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
22 lines
495 B
PHP
22 lines
495 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\VisitorEntry;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
class VisitorBadgeController extends Controller
|
|
{
|
|
public function show($id)
|
|
{
|
|
$visitor = VisitorEntry::with('employeeMaster')->findOrFail($id);
|
|
|
|
$photoUrl = $visitor->photo
|
|
? Storage::disk('public')->url($visitor->photo)
|
|
: null;
|
|
|
|
return view('visitor.badge', compact('visitor', 'photoUrl'));
|
|
}
|
|
}
|