lasthourcloud/app/Models/Team.php
2023-04-13 17:17:30 +02:00

24 lines
495 B
PHP

<?php
namespace App\Models;
class Team extends BaseModel
{
protected $casts = [
'personal_team' => 'boolean',
];
protected $fillable = [
'name',
'personal_team'
];
public function projects() {
return $this->hasMany(Project::class);
}
public function servers() {
return $this->hasMany(Server::class);
}
public function applications() {
return $this->hasManyThrough(Application::class, Project::class);
}
}