Added blog, pages, menu, category
This commit is contained in:
23
app/Models/Menu.php
Normal file
23
app/Models/Menu.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Menu extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'url',
|
||||
'new_tab',
|
||||
'parent'
|
||||
];
|
||||
|
||||
public function parentname()
|
||||
{
|
||||
return $this->belongsTo(Menu::class, 'parent');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user