add new public repo

This commit is contained in:
Andras Bacsai
2023-04-25 14:43:35 +02:00
parent dd51b002b8
commit 6135c139da
42 changed files with 495 additions and 210 deletions

View File

@@ -2,8 +2,21 @@
namespace App\Models;
class Environment extends BaseModel
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
class Environment extends Model
{
protected $fillable = [
'name',
'project_id',
];
protected function name(): Attribute
{
return Attribute::make(
set: fn (string $value) => strtolower($value),
);
}
public function project()
{
return $this->belongsTo(Project::class);
@@ -21,4 +34,3 @@ class Environment extends BaseModel
return $this->hasMany(Service::class);
}
}