ldc-supportweb/app/Models/Project.php
2025-04-23 12:24:31 +02:00

37 lines
677 B
PHP

<?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 list<string>
*/
protected $fillable = [
'name',
'site_id'
];
// * RELATIONSHIPS.
/**
* BelongsTo Site
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function site(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Site::class);
}
}