osiemsiedem / laravel-autolink
一个用于将给定文本中的URL转换为可点击链接的Laravel扩展包。
8.0.0
2024-03-20 18:32 UTC
Requires
- php: ^8.2
- illuminate/support: ^11.0
- spatie/laravel-html: ^3.6
- symfony/polyfill-mbstring: ^1.29
Requires (Dev)
- mockery/mockery: ^1.6
- phpunit/phpunit: ^10.5
README
一个用于将给定文本中的URL转换为可点击链接的Laravel扩展包。
要求
- PHP >= 8.2
- Laravel >= 11.0
安装
composer require osiemsiedem/laravel-autolink
用法
use OsiemSiedem\Autolink\Facades\Autolink; echo Autolink::convert('Check this out - www.example.com. This will be ignored - <a href="http://example.com">My awesome website</a>.'); // Check this out - <a href="http://www.example.com">example.com</a>. This will be ignored - <a href="http://example.com">My awesome website</a>.
测试
./vendor/bin/phpunit
致谢
此包基于Rinku库。
许可证
请参阅LICENSE.md文件。