28 lines
540 B
PHP
28 lines
540 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\RegistryType;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Registry extends Model
|
|
{
|
|
protected $guarded = [];
|
|
|
|
protected $hidden = ['credentials'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'type' => RegistryType::class,
|
|
'credentials' => 'encrypted:array',
|
|
];
|
|
}
|
|
|
|
public function organisation(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Organisation::class);
|
|
}
|
|
}
|