> For the complete documentation index, see [llms.txt](https://taffo.gitbook.io/hotcoffee/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://taffo.gitbook.io/hotcoffee/modules/info-pages.md).

# Info Pages

### Usage

Working with info pages is very similar to working with [articles](/hotcoffee/modules/articles.md#usage). They still need to have a title, content and custom url. They may have attachments just like the articles. However, unlike articles, you have the ability to grant access to a page only for certain user groups.

<div align="left"><img src="https://582218703-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0JvlXkNR9xWhK_ij0j%2F-M23yeYFn0et6QB3_J1l%2F-M23yoGwCJ_Efw6m4Cls%2Fadmin_pages_1.gif?alt=media&amp;token=4de8faaf-02e2-4ed7-9a2e-2dabf8ae2447" alt=""></div>

```php
use TaffoVelikoff\HotCoffee\InfoPage;
...

// get info page with ID 1
$page = InfoPage::find(1);

// will abort with 401 error if the user does not have the needed role
$page->authorizeAccess();
```

A page can also be assigned to a category. You can add new page categories in **config/hotcoffee/infopages.php**. You can publish this config file using this command:

`php artisan vendor:publish --tag=hotcoffee_config_infopages`

```php
use TaffoVelikoff\HotCoffee\InfoPage;
...

// gets all pages with key (category) "faq"
$pages = InfoPage::where('key', 'faq')->get();
```
