mr4-lc/content-protected
最新稳定版本:0.0.1
Composer 安装命令:
composer require mr4-lc/content-protected
包简介
Laravel content protected
README 文档
README
This is a laravel component that integrates [Content protected].
Protected web content.
Mode open:
- Developer (and Crawler) can access tp shadow root.
Mode closed:
- Developer (and Crawler) can access tp shadow root.
Screenshot
Installation
composer require mr4-lc/content-protected php artisan vendor:publish --tag=mr4-lc-content-protected --force
Configuration
Usage
Example router:
$router->get('content-protected', 'HomeController@getContentProtected')->name('content-protected.get');
Example controller:
public function getContentProtected() { $id = request()->get('id'); return response("<span>This is protected content <u>$id</u></span>", 200); }
Example usage
<form action="{{ route('content-protected.get') }}" method="GET" onsubmit="return false;"> <x-mr4-lc.content-protected id="1" /> <x-mr4-lc.content-protected id="2" mode="open"/> <x-mr4-lc.content-protected id="3" className="customize" adoptedStyleSheets="span { color: red; border: 2px dotted black;}" /> </form>
Basic usage
<x-mr4-lc.content-protected id="1" />
=>
<div class="mr4-lc-content-protected 1 " data-content-id="1" data-mode="closed"> #shadow-root (closed) <span>This is protected content <u>1</u></span> </div>
Mode open
<x-mr4-lc.content-protected id="2" mode="open"/>
=>
<div class="mr4-lc-content-protected 2 " data-content-id="2" data-mode="open"> #shadow-root (open) <span>This is protected content <u>2</u></span> </div>
Customize CSS
<x-mr4-lc.content-protected id="3" className="customize" />
=>
<div class="mr4-lc-content-protected 2 customize" data-content-id="3" data-mode="closed"> #shadow-root (closed) <span>This is protected content <u>3</u></span> </div>
License
Licensed under The MIT License (MIT).
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-17