PHP code example of kaiquegarcia / lumen-nginx-secure-link
1. Go to this page and download the library: Download kaiquegarcia/lumen-nginx-secure-link 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/ */
kaiquegarcia / lumen-nginx-secure-link example snippets
class ModelExample extends \Illuminate\Database\Eloquent\Model
{
use \Nginx\SecureLink\Traits\WithSecureLink;
protected $fillable = ['link'];
}
$example = new ModelExample();
$secure_link = $example->secure_link;
class ModelExample extends \Illuminate\Database\Eloquent\Model
{
use \Nginx\SecureLink\Traits\WithSecureLink;
protected $fillable = ['my_custom_url'];
protected $secure_link_origin_attribute = 'my_custom_url';
}
class IpProvider extends \Illuminate\Http\Request
{
public function ip()
{
return "the-right-ip";
}
}
class ModelExample extends \Illuminate\Database\Eloquent\Model
{
use \Nginx\SecureLink\Traits\WithSecureLink;
protected $fillable = ['link'];
protected $secure_link_ip_class_provider = IpProvider::class;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.