ldc-supportweb/app/Models/Project.php

38 lines
619 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* @property string $name
* @property Site $site_id
*/
class Project extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'site_id'
];
// * RELATIONSHIPS.
/**
2022-08-30 06:41:39 +00:00
* BelongsTo Site
*
2022-08-30 06:41:39 +00:00
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
2022-08-30 06:41:39 +00:00
public function site()
{
2022-08-30 06:41:39 +00:00
return $this->belongsTo(Site::class);
}
}