관리-도구
편집 파일: UserApprovalEmail.php
<?php namespace App\Mail; use App\Models\User; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; class UserApprovalEmail extends Mailable { use Queueable, SerializesModels; public $user; /** * Create a new message instance. * * @param User $user * @return void */ public function __construct(User $user) { $this->user = $user; // Assign the user to the public property } /** * Build the message. * * @return $this */ public function build() { return $this->view('mail.admin_approval') // Email view path ->subject('User Approval Required') // Email subject ->with(['user' => $this->user]); // Pass the user data to the view } }