PHP code example of mr4-lc / content-protected

1. Go to this page and download the library: Download mr4-lc/content-protected library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mr4-lc / content-protected example snippets


$router->get('content-protected', 'HomeController@getContentProtected')->name('content-protected.get');

public function getContentProtected()
{
    $id = request()->get('id');
    return response("<span>This is protected content <u>$id</u></span>", 200);
}