enforcePageRestrictions() public method

Add restrictions for a page query
public enforcePageRestrictions ( $query, string $action = 'view' ) : mixed
$query
$action string
return mixed
Beispiel #1
0
 /**
  * Get the most recently updated pages.
  * @param $count
  * @param int $page
  * @return mixed
  */
 public function getRecentlyUpdatedPages($count = 20, $page = 0)
 {
     return $this->permissionService->enforcePageRestrictions($this->page)->where('draft', '=', false)->orderBy('updated_at', 'desc')->with('book')->skip($page * $count)->take($count)->get();
 }