mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-26 13:27:22 +08:00
oauth response array
This commit is contained in:
@@ -7,4 +7,8 @@ class Forum extends NexusModel
|
||||
{
|
||||
protected $fillable = ['sort', 'name', 'description', 'minclassread', 'minclasswrite', 'postcount', 'topiccount', 'minclasscreate', 'forid'];
|
||||
|
||||
public function moderators()
|
||||
{
|
||||
return $this->belongsToMany(User::class, "forummods", "forumid", "userid");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class OverForum extends NexusModel
|
||||
{
|
||||
protected $table = "overforums";
|
||||
|
||||
|
||||
}
|
||||
@@ -16,4 +16,14 @@ class Topic extends NexusModel
|
||||
{
|
||||
return $this->belongsTo(Forum::class. 'forumid');
|
||||
}
|
||||
|
||||
public function firstPost()
|
||||
{
|
||||
return $this->belongsTo(Post::class, "firstpost");
|
||||
}
|
||||
|
||||
public function lastPost()
|
||||
{
|
||||
return $this->belongsTo(Post::class, "lastpost");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user