| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?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 Illuminate\Support\Facades\DB;
- class TestJob implements ShouldQueue
- {
- use Dispatchable, InteractsWithQueue, Queueable;
- private $str;
- /**
- * Create a new job instance.
- *
- * @return void
- */
- public function __construct(string $str)
- {
- $this->str = $str;
- }
- /**
- * Execute the job.
- *
- * @return void
- */
- public function handle()
- {
- DB::select("call stu_out('{$this->str}',@str)");
- echo json_encode(DB::selectOne("select @str"));
- }
- }
|