InviteController.php 591 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Generated\Controllers\V1;
  3. use App\Generated\V1\Messages\Invite\LastInviteMessage;
  4. use App\Http\Services\V1\InviteService;
  5. use App\Http\Controllers\Controller;
  6. use DB;
  7. class InviteController extends Controller
  8. {
  9. public $handler;
  10. public function __construct(InviteService $handler)
  11. {
  12. $this->handler = $handler;
  13. }
  14. public function lastInvite(LastInviteMessage $message)
  15. {
  16. $message->validateInput();
  17. $this->handler->lastInvite($message);
  18. $message->validateOutput();
  19. return $message->getResponse();
  20. }
  21. }