Add support for changing the server default allocation as a normal user
This commit is contained in:
parent
5a3428f0a0
commit
d50ea18598
14 changed files with 308 additions and 68 deletions
|
@ -64,6 +64,16 @@ class Allocation extends Model implements CleansAttributes, ValidableContract
|
|||
'server_id' => 'nullable|exists:servers,id',
|
||||
];
|
||||
|
||||
/**
|
||||
* Return a hashid encoded string to represent the ID of the allocation.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHashidAttribute()
|
||||
{
|
||||
return app()->make('hashids')->encode($this->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor to automatically provide the IP alias if defined.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue