2024-01-13 17:57:24 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
|
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
use App\Http\Requests\API\ActivateLicenseRequest;
|
|
|
|
use App\Models\License;
|
2024-02-23 18:36:02 +00:00
|
|
|
use App\Services\License\Contracts\LicenseServiceInterface;
|
2024-01-13 17:57:24 +00:00
|
|
|
|
|
|
|
class ActivateLicenseController extends Controller
|
|
|
|
{
|
|
|
|
public function __invoke(ActivateLicenseRequest $request, LicenseServiceInterface $licenseService)
|
|
|
|
{
|
|
|
|
$this->authorize('activate', License::class);
|
|
|
|
|
|
|
|
$licenseService->activate($request->key);
|
|
|
|
|
|
|
|
return response()->noContent();
|
|
|
|
}
|
|
|
|
}
|