This commit is contained in:
2017-12-22 14:59:54 +01:00
parent 59e296acfa
commit 1175a4f8ff
16 changed files with 188 additions and 53 deletions
+10 -3
View File
@@ -18,14 +18,21 @@ class Page extends Eloquent {
}
public static function getPages()
public static function getPages($user)
{
$pages = Page::whereRaw( 'id = page_id' )
->with( 'subpages' )
$pages = Page::whereRaw( 'id = page_id AND ' )
->with( ['subpages' => function($q){
$q->whereRaw('id != page_id');
}] )
->get();
return $pages;
}
public static function getAppPages()
{
$appPages = Page::whereRaw
}
}