1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace App\Jobs;
- use App\Service\OperationLogService;
- use Illuminate\Bus\Queueable;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Foundation\Bus\Dispatchable;
- use Illuminate\Queue\InteractsWithQueue;
- use Illuminate\Queue\SerializesModels;
- class OperationLog implements ShouldQueue
- {
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
- protected $insert;
- /**
- * Create a new job instance.
- *
- * @return void
- */
- public function __construct($insert)
- {
- //
- $this->insert = $insert;
- }
- /**
- * Execute the job.
- *
- * @return void
- */
- public function handle()
- {
- $insert = $this->insert;
- OperationLogService::getInstance()->insertOperationLog($insert);
- }
- }
|