fix: tree & guide
This commit is contained in:
31
app/Models/GuidePageEdge.php
Normal file
31
app/Models/GuidePageEdge.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class GuidePageEdge extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'guide_id',
|
||||
'from_page_id',
|
||||
'to_page_id',
|
||||
'label',
|
||||
'sort',
|
||||
];
|
||||
|
||||
public function guide()
|
||||
{
|
||||
return $this->belongsTo(Guide::class);
|
||||
}
|
||||
|
||||
public function fromPage()
|
||||
{
|
||||
return $this->belongsTo(GuidePage::class, 'from_page_id');
|
||||
}
|
||||
|
||||
public function toPage()
|
||||
{
|
||||
return $this->belongsTo(GuidePage::class, 'to_page_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user