diversen
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user