0cf9602958
Events can be moved to archive and moved back Fixed validation
23 lines
495 B
PHP
23 lines
495 B
PHP
<?php
|
|
|
|
namespace App\Domains\Event\Actions\ArchiveEvent;
|
|
|
|
class ArchiveEventCommand {
|
|
public ArchiveEventRequest $request;
|
|
|
|
public function __construct(ArchiveEventRequest $request) {
|
|
$this->request = $request;
|
|
}
|
|
|
|
public function execute(): ArchiveEventResponse {
|
|
$response = new ArchiveEventResponse();
|
|
|
|
$this->request->event->archived = true;
|
|
$this->request->event->save();
|
|
|
|
$response->success = true;
|
|
|
|
return $response;
|
|
}
|
|
}
|