# Installation

{% hint style="info" %}
If you like this package, please do not forget to give a star on the github.
{% endhint %}

You can install the package via composer

```bash
composer require ibnnajjaar/graphify
```

You can publish the config file with:

```bash
php artisan vendor:publish --tag="graphify-config"
```

This is the contents of the published config file:

```php
<?php

return [

    /*
     * The disk on which to store added files and derived images by default. Choose
     * one of the disks you've configured in config/filesystems.php.
     */
    'disk_name' => env('OG_IMAGE_DISK', 'public'),

    /*
     * The path of the view template file that will
     * be used to generate the open graph image.
     * */
    'view_path' => 'graphify::graphify',

    /*
     * You can specify a prefix for that is used for storing all media. If you set this
     * to `/og-images`, all your media will be stored in a `/og-images` directory.
     */
    'media_prefix' => env('OG_IMAGE_MEDIA_PREFIX', ''),
    
    /*
     * Determines if a new open graph image will be generated automatically
     * when a new resource is created.
     */
    'generate_graphify_on_create' => true,

    /*
     * Determines if the open graph image will be regenerated automatically
     * when a resource's graphify field is updated.
     */
    'generate_graphify_on_update' => true,
    
];

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ibnnajjaar.gitbook.io/graphify/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
