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
Requires
- php: ^8.2
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.9.0
- laravel/framework: ^12.0
- maatwebsite/excel: ^3.1.0
- nesbot/carbon: ^3.10.0
Requires (Dev)
- laravel/pint: ^1.22.0
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