File manager - Edit - /var/www/html/gop/api/app/Jobs/ImportSubitensData.php
Back
<?php namespace App\Jobs; use App\Imports\SubitensImport; use App\Models\LogImportacao; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Maatwebsite\Excel\Facades\Excel; class ImportSubitensData implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; protected $filePath; protected $obraId; public function __construct($obraId, $filePath) { $this->filePath = $filePath; $this->obraId = $obraId; } public function handle() { Excel::import(new SubitensImport($this->obraId), $this->filePath); LogImportacao::create([ 'obra_id' => $this->obraId, 'mensagem' => 'Importação da planilha finalizada', ]); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings