Search for links in your models content, and check them for errors
First, publish the config and migration files
php artisan vendor:publish --provider=Lelectrolux\ContentLinks\ContentLinksServiceProviderThen, run the migration
php artisan migrateThen, 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
# \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