mirror of https://github.com/Devoalda/LaDo.git
30 lines
553 B
PHP
30 lines
553 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class projectUser extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'project_user';
|
|
|
|
protected $fillable = [
|
|
'project_id',
|
|
'user_id',
|
|
];
|
|
|
|
public function project(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Project::class);
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|