Skip to content
11 changes: 11 additions & 0 deletions src/Illuminate/Database/Eloquent/Casts/AsAttribute.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Illuminate\Database\Eloquent\Casts;

use Attribute as BaseAttribute;

#[BaseAttribute]
class AsAttribute
{
//
}
33 changes: 33 additions & 0 deletions src/Illuminate/Database/Eloquent/Casts/Attribute.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace Illuminate\Database\Eloquent\Casts;

class Attribute
{
/**
* The attribute accessor.
*
* @var callable
*/
public $get;

/**
* The attribute mutator.
*
* @var callable
*/
public $set;

/**
* Create a new attribute accessor / mutator.
*
* @param callable $get
* @param callable $set
* @return void
*/
public function __construct(callable $get = null, callable $set = null)
{
$this->get = $get;
$this->set = $set;
}
}
Loading