Add projects, environments, applications, databases
This commit is contained in:
20
app/Models/Environment.php
Normal file
20
app/Models/Environment.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class Environment extends BaseModel
|
||||
{
|
||||
public function environmentables()
|
||||
{
|
||||
return $this->hasMany(EnvironmentAble::class);
|
||||
}
|
||||
public function applications()
|
||||
{
|
||||
return $this->morphedByMany(Application::class, 'environmentable');
|
||||
}
|
||||
public function databases()
|
||||
{
|
||||
return $this->morphedByMany(Database::class, 'environmentable');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user