for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Thinktomorrow\AssetLibrary;
use Illuminate\Database\Eloquent\Relations\MorphPivot;
use Illuminate\Support\Arr;
class AssociatedAsset extends MorphPivot
{
public $guarded = [];
protected $casts = [
'data' => 'array',
];
public function hasData(string $key): bool
return Arr::has($this->data, $key);
}
public function getData(string $key, $default = null)
return Arr::get($this->data, $key, $default);
public function setData(string $name, $value): self
$data = $this->data;
Arr::set($data, $name, $value);
$this->data = $data;
data
Thinktomorrow\AssetLibrary\AssociatedAsset
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.
return $this;
public function forgetData(string $name): self
Arr::forget($data, $name);
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.