17 lines
365 B
PHP
17 lines
365 B
PHP
<?php
|
|
|
|
namespace Ulmus\Attribute\Property;
|
|
|
|
use Ulmus\Attribute\Attribute;
|
|
|
|
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::IS_REPEATABLE)]
|
|
class OrderBy {
|
|
|
|
public function __construct(
|
|
public string|\Stringable|array $field,
|
|
public string $order = "ASC",
|
|
) {
|
|
$this->field = Attribute::handleArrayField($this->field);
|
|
}
|
|
}
|