created_by = Auth::id(); } } /** * Ketika role diupdate */ public function updating(Role $role) { if (Auth::check()) { $role->updated_by = Auth::id(); } } /** * Handle the Role "deleting" event. */ public function deleting(Role $role) { if (Auth::check()) { $role->updated_by = Auth::id(); $role->saveQuietly(); // Hindari loop & double log } } /** * Saat status role di-toggle */ public function toggleStatus(Role $role) { if (Auth::check()) { $role->updated_by = Auth::id(); } } }