暂存
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class Appends
|
||||
{
|
||||
/**
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public array $columns;
|
||||
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param array<int, string>|string ...$columns
|
||||
*/
|
||||
public function __construct(array|string ...$columns)
|
||||
{
|
||||
$this->columns = is_array($columns[0]) ? $columns[0] : $columns;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_METHOD)]
|
||||
class Boot
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class CollectedBy
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param class-string<\Illuminate\Database\Eloquent\Collection<*, *>> $collectionClass
|
||||
*/
|
||||
public function __construct(public string $collectionClass)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
use UnitEnum;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class Connection
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param UnitEnum|string $name
|
||||
*/
|
||||
public function __construct(public UnitEnum|string $name)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class DateFormat
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param string $format
|
||||
*/
|
||||
public function __construct(public string $format)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class Fillable
|
||||
{
|
||||
/**
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public array $columns;
|
||||
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param array<int, string>|string ...$columns
|
||||
*/
|
||||
public function __construct(array|string ...$columns)
|
||||
{
|
||||
$this->columns = is_array($columns[0]) ? $columns[0] : $columns;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class Guarded
|
||||
{
|
||||
/**
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public array $columns;
|
||||
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param array<int, string>|string ...$columns
|
||||
*/
|
||||
public function __construct(array|string ...$columns)
|
||||
{
|
||||
$this->columns = is_array($columns[0]) ? $columns[0] : $columns;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class Hidden
|
||||
{
|
||||
/**
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public array $columns;
|
||||
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param array<int, string>|string ...$columns
|
||||
*/
|
||||
public function __construct(array|string ...$columns)
|
||||
{
|
||||
$this->columns = is_array($columns[0]) ? $columns[0] : $columns;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_METHOD)]
|
||||
class Initialize
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
|
||||
class ObservedBy
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param array|string $classes
|
||||
*/
|
||||
public function __construct(public array|string $classes)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_METHOD)]
|
||||
class Scope
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
|
||||
class ScopedBy
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param array|string $classes
|
||||
*/
|
||||
public function __construct(public array|string $classes)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class Table
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param string|null $name
|
||||
* @param string|null $key
|
||||
* @param string|null $keyType
|
||||
* @param bool|null $incrementing
|
||||
* @param bool|null $timestamps
|
||||
* @param string|null $dateFormat
|
||||
*/
|
||||
public function __construct(
|
||||
public ?string $name = null,
|
||||
public ?string $key = null,
|
||||
public ?string $keyType = null,
|
||||
public ?bool $incrementing = null,
|
||||
public ?bool $timestamps = null,
|
||||
public ?string $dateFormat = null,
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class Touches
|
||||
{
|
||||
/**
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public array $relations;
|
||||
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param array<int, string>|string ...$relations
|
||||
*/
|
||||
public function __construct(array|string ...$relations)
|
||||
{
|
||||
$this->relations = is_array($relations[0]) ? $relations[0] : $relations;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class Unguarded
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class UseEloquentBuilder
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param class-string<\Illuminate\Database\Eloquent\Builder> $builderClass
|
||||
*/
|
||||
public function __construct(public string $builderClass)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class UseFactory
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param class-string<\Illuminate\Database\Eloquent\Factories\Factory> $factoryClass
|
||||
*/
|
||||
public function __construct(public string $factoryClass)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class UsePolicy
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param class-string<*> $class
|
||||
*/
|
||||
public function __construct(public string $class)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class UseResource
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param class-string<*> $class
|
||||
*/
|
||||
public function __construct(public string $class)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class UseResourceCollection
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param class-string<*> $class
|
||||
*/
|
||||
public function __construct(public string $class)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class Visible
|
||||
{
|
||||
/**
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public array $columns;
|
||||
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*
|
||||
* @param array<int, string>|string ...$columns
|
||||
*/
|
||||
public function __construct(array|string ...$columns)
|
||||
{
|
||||
$this->columns = is_array($columns[0]) ? $columns[0] : $columns;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class WithoutIncrementing
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_CLASS)]
|
||||
class WithoutTimestamps
|
||||
{
|
||||
/**
|
||||
* Create a new attribute instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user