![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/demo.cartinsight.co/vendor/spatie/laravel-html/src/Elements/ |
<?php namespace Spatie\Html\Elements; use Spatie\Html\BaseElement; use Spatie\Html\Elements\Attributes\Autofocus; use Spatie\Html\Elements\Attributes\Name; use Spatie\Html\Elements\Attributes\Required; class File extends BaseElement { use Autofocus; use Name; use Required; protected $tag = 'input'; public const ACCEPT_AUDIO = 'audio/*'; public const ACCEPT_VIDEO = 'video/*'; public const ACCEPT_IMAGE = 'image/*'; public function __construct() { parent::__construct(); $this->attributes->setAttribute('type', 'file'); } /** * @param string|null $name * * @return static */ public function accept($type) { return $this->attribute('accept', $type); } /** * @return static */ public function acceptAudio() { return $this->attribute('accept', self::ACCEPT_AUDIO); } /** * @return static */ public function acceptVideo() { return $this->attribute('accept', self::ACCEPT_VIDEO); } /** * @return static */ public function acceptImage() { return $this->attribute('accept', self::ACCEPT_IMAGE); } /** * @return static */ public function multiple() { return $this->attribute('multiple'); } }