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