add nova
This commit is contained in:
36
nova/src/Metable.php
Normal file
36
nova/src/Metable.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Laravel\Nova;
|
||||
|
||||
trait Metable
|
||||
{
|
||||
/**
|
||||
* The meta data for the element.
|
||||
*
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
public $meta = [];
|
||||
|
||||
/**
|
||||
* Get additional meta information to merge with the element payload.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function meta()
|
||||
{
|
||||
return $this->meta;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set additional meta information for the element.
|
||||
*
|
||||
* @param array<string, mixed> $meta
|
||||
* @return $this
|
||||
*/
|
||||
public function withMeta(array $meta)
|
||||
{
|
||||
$this->meta = array_merge($this->meta, $meta);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user