progress
This commit is contained in:
@@ -2,9 +2,23 @@
|
||||
|
||||
namespace App\Models\Forum;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Post extends Model
|
||||
{
|
||||
//
|
||||
protected $table = 'forum_posts';
|
||||
|
||||
protected $fillable = [
|
||||
'content',
|
||||
'user_id',
|
||||
'category_id',
|
||||
'thread_id',
|
||||
'topic_id',
|
||||
];
|
||||
|
||||
public function author()
|
||||
{
|
||||
return $this->hasOne(User::class, 'id', 'user_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user