Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Jobs;
- use App\MktProduto;
- use Illuminate\Bus\Queueable;
- use Illuminate\Queue\SerializesModels;
- use Illuminate\Queue\InteractsWithQueue;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Foundation\Bus\Dispatchable;
- class UpdateMarktplace implements ShouldQueue
- {
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
- /**
- * Create a new job instance.
- *
- * @return void
- *
- *
- */
- public function __construct($produto)
- {
- $this->descricao = $produto->descricao;
- $this->grupo = $produto->grupo;
- $this->subgrupo = $produto->subgrupo;
- }
- /**
- * Execute the job.
- *
- * @return void
- */
- public function handle()
- {
- $mkt = new MktProduto();
- $mkt->descricao = $this->descricao;
- $mkt->descricao = $this->grupo;
- $mkt->descricao = $this->subgrupo;
- $mkt->save();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement