Skip to content

Instantly share code, notes, and snippets.

@soarecostin
Created November 28, 2019 11:02
Show Gist options
  • Select an option

  • Save soarecostin/95d630623d1babdda6e8eeed15b32f81 to your computer and use it in GitHub Desktop.

Select an option

Save soarecostin/95d630623d1babdda6e8eeed15b32f81 to your computer and use it in GitHub Desktop.
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use SoareCostin\FileVault\Facades\FileVault;
class EncryptFile implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $filename;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($filename)
{
$this->filename = $filename;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
FileVault::encrypt($this->filename);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment