HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/vanderkampen/kwaliteitsbouw.com/app/KommaApp/Kms/Core/Attributes/Password.php
<?php
namespace App\KommaApp\Kms\Core\Attributes;

use App\KommaApp\Kms\Core\Attributes\Traits\LabelTrait;
use App\KommaApp\Kms\Core\Attributes\Traits\PlaceholderTextTrait;
use App\KommaApp\Kms\Core\Attributes\Traits\ReadOnlyTrait;

class Password extends Attribute
{
    use PlaceholderTextTrait;
    use ReadOnlyTrait;

    /**
     * @var string $labelText
     */
    private $labelText = '';

    /**
     * @var string $repeatLabelText
     */
    private $repeatLabelText = '';

    /**
     * Password constructor.
     * @param string $password The text of the title
     */
    public function __construct(string $password = '')
    {
        parent::__construct();
        $this->setValue($password);
    }

    /**
     * @return string The hashed password.
     */
    public function getValue(): string
    {
        return \Hash::make($this->value);
    }

    /**
     * Returns a view that visually represents this attribute
     *
     * @return \Illuminate\View\View
     */
    public function render()
    {
        return \View::make('kms/attributes.password', [
            'attribute' => $this
        ]);
    }


    /**
     * @return string
     */
    public function getLabelText()
    {
        return $this->labelText;
    }

    /**
     * @param string $labelText
     * @return $this
     */
    public function setLabelText(string $labelText)
    {
        $this->labelText = $labelText;
        return $this;
    }

    /**
     * @return string
     */
    public function getRepeatLabelText()
    {
        return $this->repeatLabelText;
    }

    /**
     * @param string $repeatLabelText
     * @return $this
     */
    public function setRepeatLabelText(string $repeatLabelText)
    {
        $this->repeatLabelText = $repeatLabelText;
        return $this;
    }
}