New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

code16/sharp-ohdear-broken-links

This is my package sharp-ohdear-broken-links
1,987 1
Install
composer require code16/sharp-ohdear-broken-links
Latest Version:v3.0.1
PHP:8.3.*|8.4.*|8.5.*
Laravel:12 · 13
Older releases:10 · 11
License:MIT
Last Updated:Oct 21, 2026
Links: GitHub  ·  Packagist
Maintainer: code16

A Laravel package designed to be used with Sharp to display broken links from your OhDear monitoring.

Installation

composer require code16/sharp-ohdear-broken-links

Usage

This package is designed to add a broken links' list in your Sharp back-office. It uses the OhDear env keys to connect to OhDear API, you need at least OH_DEAR_MONITOR_ID and OH_DEAR_API_TOKEN.

Optionally, you can publish the package configuration with:

php artisan vendor:publish --tag=sharp-ohdear-broken-links-config

In your Sharp Configuration Service Provider, add the broken links' entity :

class SharpConfigServiceProvider extends SharpAppServiceProvider
{
    protected function configureSharp(SharpConfigBuilder $config): void
    {
        $config
            ->setName('Your beautiful project')
            ->setSharpMenu(AppSharpMenu::class)
            ->discoverEntities()
            ->declareEntity(Code16\SharpOhdearBrokenLinks\Sharp\Entities\BrokenLinkEntity::class); // <-- declare the package entity here
    }

Then add it to your sharp menu:

class AppSharpMenu extends SharpMenu
{
    public function build(): self
    {
        // [...]
        return $this
           ->addEntityLink(
                entityKeyOrClassName: Code16\SharpOhdearBrokenLinks\Sharp\Entities\BrokenLinkEntity::class, 
                label: 'Broken links', 
                icon: 'fas-link-slash',
                badge: fn () => BrokenLinksService::isConfigured() ? BrokenLinksService::make()->getBrokenLinksCount() : null, // facultative, adds a count badge on the menu item
            );
    }
}

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

ohdearapp/laravel-ohdear-webhooks

Handle Oh Dear webhook calls in a Laravel app

29,551 23
ohdearapp/ohdear-cli

A standalone CLI tool for Oh Dear monitoring.

1,352 142
brightmachine/scrutiny

Scrutiny checks over your environment to make sure your app is running as it sho...

2,379 34
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982

Version History

Version Released PHP Laravel License
v3.0.1 8.3.*|8.4.*|8.5.* ^12.0|^13.0 MIT
v3.0.0 8.3.*|8.4.*|8.5.* ^12.0|^13.0 MIT
v2.7.2 8.3.*|8.4.*|8.5.* ^10.0|^11.0|^12.0|^13.0 MIT
v2.7.1 ^8.3|^8.4|^8.5 ^10.0|^11.0|^12.0 MIT
v2.7 ^8.3|^8.4|^8.5 ^10.0|^11.0|^12.0 MIT