lelectrolux/content-links

Search for links in your models content, and check them for errors

Installs: 18

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/lelectrolux/content-links

1.4.1 2025-06-18 19:07 UTC

This package is auto-updated.

Last update: 2026-02-18 20:47:01 UTC


README

Search for links in your models content, and check them for errors

Getting Started

First, publish the config and migration files

php artisan vendor:publish --provider=Lelectrolux\ContentLinks\ContentLinksServiceProvider

Then, run the migration

php artisan migrate

Then, for each relevant model:

  • Add 2 imports
use \Lelectrolux\ContentLinks\Contracts\HasContentLinks as HasContentLinksContract;
use \Lelectrolux\ContentLinks\Models\HasContentLinks;
  • Implement HasContentLinksContract
  • Use HasContentLinks

Finally, add all the models ::class to the content-links.models config key

Optionally, add the commands to your scheduler

Available commands

# \Lelectrolux\ContentLinks\Console\Commands\ContentLinksCheck
# php artisan content-links:check {class?*} {--failed}
php artisan content-links:check
php artisan content-links:check App\Models\MyModel
php artisan content-links:check App\Models\MyModel:1,2,3
php artisan content-links:check App\Models\MyModel:1,2,3 App\Models\MyOtherModel
# \Lelectrolux\ContentLinks\Console\Commands\ContentLinksPurge
php artisan content-links:purge

Export