TaskInfoController.php 602 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Crontab\Controllers;
  3. use App\Crontab\Services\TaskInfoService;
  4. use App\Base\Controllers\Controller;
  5. use Illuminate\Http\Request;
  6. class TaskInfoController extends Controller
  7. {
  8. private $service;
  9. /**
  10. * TaskInfoController constructor.
  11. * @param TaskInfoService $service
  12. */
  13. public function __construct(TaskInfoService $service)
  14. {
  15. $this->service = $service;
  16. }
  17. /**
  18. * @param Request $request
  19. * @return int
  20. */
  21. public function task(Request $request)
  22. {
  23. return $this->service->execute($request->all());
  24. }
  25. }