ldc-legaulois/app/Models/Forum.php

20 lines
429 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Forum extends Model
{
public function theme() {
return $this->belongsTo('App\Models\ForumThemes', 'theme_id');
}
public function customer() {
return $this->belongsTo('App\Models\Customers', 'customer_id');
}
public function answers() {
return $this->hasMany('App\Models\ForumAnswers', 'forum_id');
}
}