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