enforceBookRestrictions() public method

Add restrictions to a book query.
public enforceBookRestrictions ( $query, string $action = 'view' ) : mixed
$query
$action string
return mixed
Exemplo n.º 1
0
 /**
  * Get the most recently updated books.
  * @param $count
  * @param int $page
  * @return mixed
  */
 public function getRecentlyUpdatedBooks($count = 20, $page = 0)
 {
     return $this->permissionService->enforceBookRestrictions($this->book)->orderBy('updated_at', 'desc')->skip($page * $count)->take($count)->get();
 }