home
/
zktecojo
/
public_html
/
app
/
models
➕ New
📤 Upload
✎ Editing:
Pages.php
← Back
<?php class Pages extends Eloquent { /** * The database table used by the model. * * @var string */ protected $table = 'pages'; protected $primaryKey = 'page_id'; public function parent() { return $this->hasOne('pages', 'page_id', 'page_parent_id'); } public function children() { return $this->hasMany('pages', 'page_parent_id', 'page_id'); } public static function tree() { return static::with(implode('.', array_fill(0, 100, 'children')))->where('page_parent_id', '=', 0)->get(); } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel