LandingPageController.php 531 B

12345678910111213141516171819
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Http\Requests\LandingPageRegisterRequest;
  4. use App\Services\LandingPageService;
  5. use Illuminate\Http\JsonResponse;
  6. class LandingPageController extends Controller
  7. {
  8. public function __construct(protected LandingPageService $service) {}
  9. public function register(LandingPageRegisterRequest $request): JsonResponse
  10. {
  11. $this->service->registerUser($request->validated());
  12. return $this->successResponse(message: __('messages.landing.register_success'));
  13. }
  14. }