lasthourcloud/app/Models/ApplicationPreview.php
Andras Bacsai 232d2ccf79 mostly css
2023-05-31 10:19:29 +02:00

24 lines
578 B
PHP

<?php
namespace App\Models;
class ApplicationPreview extends BaseModel
{
protected $fillable = [
'uuid',
'pull_request_id',
'pull_request_html_url',
'fqdn',
'status',
'application_id',
];
public function application()
{
return $this->belongsTo(Application::class);
}
static function findPreviewByApplicationAndPullId(int $application_id, int $pull_request_id)
{
return self::where('application_id', $application_id)->where('pull_request_id', $pull_request_id)->firstOrFail();
}
}