daily pastebin goal
7%
SHARE
TWEET

filas Laravel

a guest Jun 13th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. namespace App\Jobs;
  4.  
  5. use App\MktProduto;
  6. use Illuminate\Bus\Queueable;
  7. use Illuminate\Queue\SerializesModels;
  8. use Illuminate\Queue\InteractsWithQueue;
  9. use Illuminate\Contracts\Queue\ShouldQueue;
  10. use Illuminate\Foundation\Bus\Dispatchable;
  11.  
  12. class UpdateMarktplace implements ShouldQueue
  13. {
  14.     use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  15.  
  16.     /**
  17.      * Create a new job instance.
  18.      *
  19.      * @return void
  20.      *
  21.      *
  22.      */
  23.  
  24.  
  25.  
  26.     public function __construct($produto)
  27.     {
  28.         $this->descricao = $produto->descricao;
  29.         $this->grupo = $produto->grupo;
  30.         $this->subgrupo = $produto->subgrupo;
  31.     }
  32.  
  33.     /**
  34.      * Execute the job.
  35.      *
  36.      * @return void
  37.      */
  38.     public function handle()
  39.     {
  40.         $mkt = new MktProduto();
  41.         $mkt->descricao = $this->descricao;
  42.         $mkt->descricao = $this->grupo;
  43.         $mkt->descricao = $this->subgrupo;
  44.         $mkt->save();
  45.        
  46.  
  47.     }
  48. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top