xxxxxxxxxx
projects
id - integer
name - string
environments
id - integer
project_id - integer
name - string
deployments
id - integer
environment_id - integer
commit_hash - string
xxxxxxxxxx
// Post model
public function comments()
{
return $this->hasMany(Comment::class);
}
// Post controller
$comments = Post::find(1)->comments;