mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 18:15:58 +00:00
static hosting
This commit is contained in:
1 parent
cc1c08786f
commit
f4210e39f2
14 files changed
+90
-28
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ApplicationSetting extends Model
|
||||
@@ -11,6 +12,20 @@ class ApplicationSetting extends Model
|
||||
'is_git_submodules_allowed',
|
||||
'is_git_lfs_allowed',
|
||||
];
|
||||
public function isStatic(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
set: function ($value) {
|
||||
if ($value) {
|
||||
$this->application->ports_exposes = '80';
|
||||
} else {
|
||||
$this->application->ports_exposes = '3000';
|
||||
}
|
||||
$this->application->save();
|
||||
return $value;
|
||||
}
|
||||
);
|
||||
}
|
||||
public function application()
|
||||
{
|
||||
return $this->belongsTo(Application::class);
|
||||
|
||||
Reference in new issue
Block a user