File: D:/HostingSpaces/SBogers10/switch4u.komma.nl/vendor/komma/kms/src/Core/Attributes/Password.php
<?php
namespace Komma\KMS\Core\Attributes;
use Komma\KMS\Core\Attributes\Traits\PlaceholderTextTrait;
use Komma\KMS\Core\Attributes\Traits\ReadOnlyTrait;
class Password extends Attribute
{
use PlaceholderTextTrait;
use ReadOnlyTrait;
/**
* Returns true if the password is an empty string.
* Notice: When the password is an empty string, the result of getValue is not an empty string!
* That is why this method is needed.
*/
public function isEmpty()
{
return !$this->value || $this->value == '';
}
/**
* @return string The hashed password.
*/
public function getValue(): string
{
return \Hash::make($this->value);
}
/**
* Returns a view that visually represents this attribute
*
* @return string
*/
public function render(): string
{
return view('KMS::attributes.password', [
'attribute' => $this
])->render();
}
}