Updated ERP with new modules and features
This commit is contained in:
22
app/Models/Server.php
Normal file
22
app/Models/Server.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Traits\LogsActivity;
|
||||
|
||||
class Server extends Model
|
||||
{
|
||||
use LogsActivity;
|
||||
protected $fillable = [
|
||||
'name', 'ip_address', 'os_version', 'username', 'password', 'services', 'status'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'password' => 'encrypted', // Automatically encrypts/decrypts
|
||||
'services' => 'array', // Casts JSON to PHP array
|
||||
];
|
||||
|
||||
// Hide password from standard array/JSON serialization for safety
|
||||
protected $hidden = ['password'];
|
||||
}
|
||||
Reference in New Issue
Block a user