feat/reverb (#20)
Co-authored-by: jon brookes <marshyon@gmail.com> Reviewed-on: https://codeberg.org/headshed/share-lt/pulls/20
This commit is contained in:
parent
74bc17d019
commit
21147af908
30 changed files with 1948 additions and 29 deletions
28
app/Http/Controllers/NotificationController.php
Normal file
28
app/Http/Controllers/NotificationController.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Events\PreviewSiteBuilt;
|
||||
use App\Http\Requests\SendPreviewSiteBuiltNotificationRequest;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
class NotificationController extends Controller
|
||||
{
|
||||
/**
|
||||
* Send preview site built notification.
|
||||
*/
|
||||
public function sendPreviewSiteBuilt(SendPreviewSiteBuiltNotificationRequest $request): JsonResponse
|
||||
{
|
||||
$message = $request->validated()['message'];
|
||||
|
||||
PreviewSiteBuilt::dispatch($message, 'success');
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => 'Preview site built notification sent successfully',
|
||||
'data' => [
|
||||
'notification_message' => $message,
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue