mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-10 10:23:46 +02:00
API Model updates.
This commit is contained in:
@@ -48,4 +48,14 @@ class APIKey extends Model
|
||||
* @var array
|
||||
*/
|
||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* Gets the permissions associated with a key.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function permissions()
|
||||
{
|
||||
return $this->hasMany(APIPermission::class, 'key_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user