1. Go to this page and download the library: Download hxm/media-encrypt 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/ */
hxm / media-encrypt example snippets
use Illuminate\Database\Eloquent\Model;
use HXM\MediaEncrypt\Contracts\CanMediaEncryptInterface;
use HXM\MediaEncrypt\Traits\HasMediaEncrypt;
class OnlineRequest extends Model implements CanMediaEncryptInterface
{
use HasMediaEncrypt;
#...
}
use Illuminate\Database\Eloquent\Model;
use HXM\MediaEncrypt\Contracts\CanMediaEncryptInterface;
use HXM\MediaEncrypt\Traits\HasMediaEncrypt;
use HXM\MediaEncrypt\Casts\MediaEncryptCast;
use HXM\MediaEncrypt\Casts\MultiMediaEncryptCast;
class DemoModel extends Model implements CanMediaEncryptInterface
{
use HasMediaEncrypt;
protected $appends = ['baseData', 'media', 'media_multi'];
protected $casts = [
#...
'baseData' => MediaEncryptCast::class,
'media' => MediaEncryptCast::class,
'media_multi' => MultiMediaEncryptCast::class,
];
#...
}