[ All integrations ](https://ohdear.app/third-party-integrations)

# Laravel Nova Tool

Display Oh Dear check results directly in your Laravel Nova admin panel.

[ ohdearapp/ohdear-nova ](https://github.com/ohdearapp/ohdear-nova)

by [ Oh Dear ](https://ohdear.app)

[Nova](https://nova.laravel.com) is first party Laravel package that makes it easy to add an admin section to your Laravel application.

Our [nova-ohdear-tool](https://github.com/ohdearapp/nova-ohdear-tool) package contains a tool that will display all check results of an Oh Dear monitored website.

## Install the Nova tool [\#](#install-the-nova-tool)

You can install the package in a Laravel application that uses [Nova](https://nova.laravel.com) via composer:

```
<span class="hl-keyword">composer</span> require ohdearapp/nova-ohdear-tool
```

Next up, you must register the tool with Nova. This is typically done in the `register` method of the `NovaServiceProvider`.

```
<span class="hl-comment">// in app/Providers/NovaServiceProvder.php</span>

<span class="hl-comment">// ...</span>

<span class="hl-keyword">public</span> <span class="hl-keyword">function</span> <span class="hl-property">register</span>()
{
    <span class="hl-type">Nova</span>::<span class="hl-property">tools</span>([
        <span class="hl-comment">// ...</span>
        <span class="hl-keyword">new</span> <span class="hl-type">\OhDear\OhDearTool\OhDearTool</span>(),
    ]);
}
```

Afterwards you must publish the config file:

```
<span class="hl-keyword">php</span> <span class="hl-keyword">artisan</span> vendor:publish <span class="hl-attribute">--provider</span>=<span class="hl-value">"OhDear\OhDearTool\OhDearToolServiceProvider"</span>
```

This is the content of the published config file `config/nova-ohdear-tool.php`.

```
<span class="hl-keyword">return</span> [
    <span class="hl-comment">/*
     * A valid API token for your Oh Dear account. Instructions on how to get a
     * token can be found on this page: https://ohdear.app/docs/api/authentication
     */</span>
    <span class="hl-value">'api_token'</span> => <span class="hl-property">env</span>(<span class="hl-value">'OH_DEAR_API_TOKEN'</span>),

    <span class="hl-comment">/*
     * The id of the monitor you want to display in the tool.
     * You can get the id of the monitor on the settings screen of a site on Oh Dear
     */</span>
    <span class="hl-value">'monitor_id'</span> => <span class="hl-property">env</span>(<span class="hl-value">'OH_DEAR_SITE_ID'</span>),
];
```

These values can be stored in your `.env` environment file.

```
<span class="hl-type">OH_DEAR_API_TOKEN</span>=
<span class="hl-type">OH_DEAR_SITE_ID</span>=
```

If you cache your configuration files, don't forget to renew your cache with `php artisan config:cache`.

## Using the Nova tool [\#](#using-the-nova-tool)

After the installation you can find an "Oh Dear" menu item in your Nova app to see the broken links and mixed content of your site.

## Screenshots
