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/SBogers47/leden.ehbocranendonck.nl/app/KommaApp/Kms/Core/Attributes/File.php
<?php
namespace App\KommaApp\Kms\Core\Attributes;

use App\KommaApp\Kms\Core\Attributes\Traits\LabelTrait;
use Illuminate\Support\MessageBag;

/**
 * Class File
 *
 * For uploading files but not store them.
 * If you also want to store them, you need to use another attribute
 *
 * @package App\KommaApp\Kms\Core\Attributes
 */
class File extends Attribute
{
    use LabelTrait;

    /** @var string $accept */
    protected $accept;

    /**
     * Title constructor.
     * @param string $label
     */
    public function __construct(string $label = '')
    {
        $this->setLabelText($label);
        parent::__construct();
    }

    /**
     * Returns a view that visually represents this attribute
     *
     * @return \Illuminate\View\View
     */
    public function render()
    {
        return \View::make('kms/attributes.file', [
            'attribute' => $this,
            'successes' => (\Session::has('successes')) ? \Session::get('successes') : new MessageBag()
        ]);
    }

    /**
     * @return string
     */
    public function getAccept(): string
    {
        return $this->accept;
    }

    /**
     * @param string $accept
     * @return File
     */
    public function setAccept(string $accept): self
    {
        $this->accept = $accept;
        return $this;
    }
}