lasthourcloud/app/Models/Team.php

24 lines
495 B
PHP
Raw Normal View History

<?php
namespace App\Models;
class Team extends BaseModel
{
protected $casts = [
'personal_team' => 'boolean',
];
protected $fillable = [
'name',
2023-04-13 15:17:30 +00:00
'personal_team'
];
public function projects() {
return $this->hasMany(Project::class);
}
2023-03-27 12:31:42 +00:00
public function servers() {
return $this->hasMany(Server::class);
}
2023-03-30 17:50:27 +00:00
public function applications() {
return $this->hasManyThrough(Application::class, Project::class);
}
}